aboutsummaryrefslogtreecommitdiff
path: root/src/delete.c
Commit message (Collapse)AuthorAge
* New assert()s to help verify union access. No logic changes. Testing anddrh2024-09-20
| | | | | validation code only. FossilOrigin-Name: b7b64c53f5d7f6b405ee3f1f1be1d84230aa79db5a502c8ad78d3e524f4384fb
* Fix minor comment issues.drh2024-08-20
| | | FossilOrigin-Name: c1bbed19f4348ec31c3cb4723eaa8f1554bb58ef4de7feb3a0f39612785f13d5
* Tighter checking of access constraints on union members in SrcItem.drh2024-08-20
| | | | | Improved invariant checking. FossilOrigin-Name: fd72d3400a8fe5747f494eee81654698acee350bb95b9db269e87d857af03492
* Fix some stray SrcItem field name fixes.drh2024-08-20
| | | FossilOrigin-Name: bc5f5ce59e1e4323422bda7d002310923f927a03b4fd42749bf04f6c9853956b
* Give unique names to fields in the SrcItem object, to facilitate analysis ofdrh2024-08-17
| | | | | how those fields are used using "grep". FossilOrigin-Name: 9f5aeef3cbc2c95267c8f7bf60d5c66971a76789669fb0e8f853273ff6f616f2
* Reduce the size of the SrcItem object by combining fields into a union.drh2024-08-17
| | | FossilOrigin-Name: a4c59ac3c6ec979c25b544d29e47b8e39f6439c098eed8f84b3bd506c9adf047
* Add bit to sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) that willdrh2023-07-31
| | | | | disable the one-pass optimizating in DELETE and UPDATE. FossilOrigin-Name: 22f6dd5cd32ed9e7b932fdba98aa8652fde999df79f4995d3d8ac1acf430cf53
* Avoid unnecessary calls to sqlite3DeleteTable() with NULL pointers.drh2023-06-20
| | | FossilOrigin-Name: 4a35f391995a88757d7b46f52bf241f523ee2a6a7b6726df00cddaec8cee7080
* Avoid unnecessary calls to sqlite3CodeRowTrigger().drh2023-06-20
| | | FossilOrigin-Name: 27c174dbd0e7ba029d13fb005fc950ac99eb6aee31903ee3acfc88c262d13f6a
* Address various harmless compiler warnings fromdrh2023-06-16
| | | | | [forum:/forumpost/d526da8ee4|forum post d526da8ee4]. FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
* Fix straggler misspellings and tidy the custom dictionary. Also include ↵larrybr2023-06-07
|\ | | | | | | | | pickups from [forum:/info/c61fb09afd|forum post c61fb09afd]. FossilOrigin-Name: 8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
* | Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
|/ | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* New assert() statements to verify that Expr.iColumn is never used as andrh2023-05-17
| | | | | array index when its value is negative. FossilOrigin-Name: 6084c5fb6d3fcedf35cd6c597a44ec7bf8b4a2576c7b277e5342d2a7905318e7
* Avoid an assert() failure that could occur in ↵dan2023-05-17
| | | | | SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds when a WITH clause attached to an UPDATE or DELETE statement created a CTE of the same name as the table being modified. FossilOrigin-Name: 8edf56d1698c3db38250db3b25864f658488414efb3a6b3e1443283b6affd26d
* Fix multiple problems with RETURNING on a DML statement against a view,drh2023-03-28
| | | | | | | | | | all inspired by [forum:/forumpost/dc3b92cfa0|forum post dc3b92cfa0]. (1) Do not allow a RETURNING clause to trick the code generator into thinking that the view being updated has an INSTEAD OF trigger. (2) Generate all result columns for a view in a DML statement. (3) The automatic covering index for a view should cover all result columns of the view. FossilOrigin-Name: c8bedef0d61731c29ae34de1594222d15b578f9e2cddbbd5b74fb3059644fe0f
* Disallow the one-pass optimization for DELETE if the WHERE clause containsdrh2023-03-15
| | | | | | | | a subquery. Fix for the problem reported by [forum:/forumpost/e61252062c9d286d|forum post e61252062c9d286d]. This fix is more restrictive than necessary. It could be relaxed if the subquery does not involve the table that is the subject of the DELETE. FossilOrigin-Name: 73f0036f045bf37193b6e87ae45b578c5831614c530488257c69666178da3aa5
* Add the new internal interface sqlite3DbNNFreeNN(db,ptr) where both thedrh2022-08-22
| | | | | | | db and ptr parameters are guaranteed to be non-NULL. Use this where appropriate to save more than 2 million CPU cycles on the standard performance test. FossilOrigin-Name: e5eaa80e81fdf86f2875a912b880272b8d099b82b08e945a7988c5dd0fe9d6b5
* Enhance the enforcement of SQLITE_VTAB_DIRECTONLY so that it applies todrh2022-08-20
| | | | | | | DML statements within triggers. Do not allow DML stratements against virtual tables within triggers unless either the virtual table is SQLITE_VTAB_INNOCUOUS or PRAGMA trusted_schema is ON. FossilOrigin-Name: 9433ea4070f52135be64569057f439e7bdb4b3f425d87167c9ebda50011210c1
* Small performance increase and size reduction by splitting out thedrh2022-07-25
| | | | | sqlite3VdbeGetLastOp() from sqlite3VdbeGetOp(). FossilOrigin-Name: 92ac01d41d46ab73e189b1e5596ea63e5edb5b15639c5d7bdb981b95366c069b
* Improved technique for parsing the ON and USING clauses of a join is fasterdrh2022-04-07
| | | | | and uses less memory. FossilOrigin-Name: 158156a3e3d50042cafc75dea3aaaa68b1f2efb9c3d178518ea6e68e32e0d21c
* Attempt to show triggers in the TreeView output from DELETE, INSERT, anddrh2022-04-06
| | | | | UPDATE statements. FossilOrigin-Name: b0939d6f4d94b45dce53ace6295508a67d574cc72bd6977623bf77065b3c4e64
* Rename debugging defines and variables from SELECTTRACE to TREETRACE (anddrh2022-04-06
| | | | | | similar) since the functionality has how expanded to include data structures beyond SELECT statements. Should not affect deliverable builds. FossilOrigin-Name: 393fa32e188a017f431372b54037cb31e885030542f00d0bfd59da9d9db5c014
* Add additional tree display routines for DELETE and UPDATE. No changesdrh2022-04-06
| | | | | to deliverable code. FossilOrigin-Name: fbd288ff3d4ea47cd324b5952e7754a465901844f2d950f0860d4488d5b6eb9f
* Give the virtual table xBestIndex method access to (some) OFFSET and LIMITdrh2022-01-27
| | | | | clauses. FossilOrigin-Name: 74fa5757ee0a8499bcd6546dac1a3ecc6048ba9cff9e3e574e28e6e82e894a3d
* Remove many redundant checks for sqlite3.mallocFailed now that any OOM shoulddrh2022-01-24
| | | | | cause Parse.nErr to be non-zero. FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
* Check for foreign key constraint errors prior to returning the results fromdrh2021-12-01
| | | | | a RETURNING clause. See [forum:/forumpost/793beaf322|forum post 793beaf322]. FossilOrigin-Name: a818ba2ed635b91e279dde44236fc7446a33db2b46c9409b67021248c01bf4e5
* New assert() statements to protect the u1 and u2 unions of SrcList.drh2021-10-07
| | | FossilOrigin-Name: 9b91fbcfcc14048f7d0755d47d9b7f9212fa2eaa6f3c04f417fa16c3a47943bf
* Fix the build for SQLITE_ENABLE_UPDATE_DELETE_LIMIT.drh2021-08-03
| | | FossilOrigin-Name: 5150d2da06ab3c7e3bea1865413cd21c64d5cefb91d3d874e9dd0bf51aea754b
* Refactor the Table object to reduce its memory footprint.drh2021-08-02
| | | FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
* An index on the expression "likely(X)" should store the true value of X,drh2021-06-14
| | | | | | | | even if X is a real number with no fractional part. The optimization of storing some REAL indexed values as INT (see [10d851353c2abead]) should be omitted for index columns that are expressions. [forum:/forumpost/3b940c437a|Forum post 3b940c437a]. FossilOrigin-Name: 791473bc6677c2ae76f558082a4b43ca1eaf9895b76624d5b55d58f2af898ff3
* Fix the truncate optimization so that PRAGMA count_changes and changes()drh2021-06-03
| | | | | | return correct values even for a WITHOUT ROWID table. [forum:/forumpost/07dedbf9a1|Forum post 07dedbf9a1]. FossilOrigin-Name: 820ae3b117c2d8c117c0c5a4e440a7d06886772516c7fc0a84606388f91be195
* Fix a problem with UPDATE and DELETE statements that use both INDEXED BY and ↵dan2021-02-25
| | | | | LIMIT clauses in SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds. FossilOrigin-Name: cc2b4b38668bd32ebd8cf2e0d244eef2a6c7e0a1ee0a34c9c43eaf25c9cc09ae
* Materialize any CTE that is used more than once.drh2021-02-21
| | | FossilOrigin-Name: ba59159fbe6b83fb6d79fbfee22d983768b0ebbaac7e99d2ac66c810e5e04100
* Rename the "struct SrcList_item" object to the more succinct "SrcItem".drh2021-02-21
| | | | | This is a symbolic change only. The logic is unmodified. FossilOrigin-Name: bfd5bf2c73110fcb36db9ba2a949ff516131fbd3e89325f88fe9f5c2b4ed87b2
* Performance improvement in resolving the INDEXED BY index name for the commondrh2021-02-20
| | | | | case where there is no INDEXED BY clause. FossilOrigin-Name: 554b286ac208168bde91c6c6034cc7087410def76fce650b519661b2ee2c61b7
* New opcode OP_ChngCntRow used to output the result of PRAGMA change_count.drh2021-01-31
| | | | | | Only this new opcode, and not OP_ResultRow, checks for foreign key errors. Faster performance, and now also works with RETURNING. FossilOrigin-Name: 154fc2b15465c7c92a1af0a93851421aec42a81bab54840a9701f2c78068e14e
* RETURNING works even if "PRAGMA count_changes=ON" is set.drh2021-01-29
| | | FossilOrigin-Name: a9122d97577b239704cdee1a90a3b0dbff8bdf9dea2324d7315bd47238dcc8eb
* Do not apply affinities when creating entries for automatic indexes on ↵dan2020-10-03
| | | | | views. Fix for [95302bdb]. FossilOrigin-Name: df12f097224ebc9473d9e2a8933bd7efed6490d09af2c012c9b59a7892369b7f
* For UPDATE and DELETE, use OP_DeferredSeek always. If the seek must laterdrh2020-08-14
| | | | | | | | | be resolved, add the OP_FinishSeek opcode after all WHERE clause terms have been processed. This obviates the need for the WHERE_SEEK_TABLE and WHERE_SEEK_UNIQ_TABLE flags to sqlite3WhereBegin() and the ensuing complication, and it allows the covering index optimization to be used further into WHERE clause processing. FossilOrigin-Name: a495f60d315e34b1a1bc5fb1336e05047add52c8fb2710b577c97b10a5e734f6
* Merge latest trunk changes with this branch.dan2020-07-13
|\ | | | | FossilOrigin-Name: 5ee3c27e20d12a126fb773b428bb864102b949a5b26a8d5c523753dcedf4be10
| * Further refactoring of the schema table name.drh2020-06-19
| | | | | | FossilOrigin-Name: 9536fa0ae0c1ae6e2e98d2fa11e5acda7f3c9b8ca5061b6f7f8cae63a11d936b
| * Earlier detection of index corruption caused by missing index entries.drh2020-05-05
| | | | | | FossilOrigin-Name: f339f31f9e9a856b576f99c5230fdf6d60fdc2873e48cb5aa0a4ab1d04e3c930
* | Allow a FROM clause in UPDATE statements.dan2020-04-27
|/ | | FossilOrigin-Name: f353a1a613bb7ad8cedcda377a7fe6fd05ee03b1f50665b00b84a868a71c5bec
* During byte-code generation, strive to avoid jumps that merely jump to thedrh2020-02-07
| | | | | following instruction. FossilOrigin-Name: bcf876e67e75f6709f2b25683a3952bbbb87c672bb9d7af456feebc0ab9f6c31
* Break out the test for writable shadow tables into a separate subroutine.drh2019-11-16
| | | FossilOrigin-Name: 8ad34d36a141fa8f5d9bd784dfeb892c983897a6dc6b867607cc668508acf944
* In sqlite3GenerateIndexKey(), do not attempt to reuse column values fromdrh2019-11-02
| | | | | | the previous index if the current index is a partial index as the partial index test may have corrupted those values. Ticket [a9efb42811fa41ee] FossilOrigin-Name: 17e9f65814264de9c35bc5ba94e0a66fbbf1200c00d33ab9a19a0b6f92bc685a
* Add missing column translations to foreign key logic.drh2019-11-01
| | | | | Ticket [c28a01da72f8957c] FossilOrigin-Name: bc6a43e7ee6353b9ef3dea4309c77e170a1c798eefcfaa7636bf5a93e51c47ee
* Revamp the SrcList allocator routines to be methods of Parse instead ofdrh2019-01-17
| | | | | | being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. FossilOrigin-Name: df08d472b090b212fb77ce2aae0e1ffe79ae5db4b1accf55e6fdb18e8b0a7098
* A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewerdrh2018-12-29
| | | | | | | | | memory allocations by deferring memory allocation until sqlite3VdbeResolveLabel() is called, at which point the code generator has a better idea of how big the relocation table needs to be. The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of Vdbe*. FossilOrigin-Name: 4a0929ac76d8aa5dd65eac3b83d6bbf41e505e01d175ca0fb2b19ba02d439415
* Fixes for SQLITE_OMIT_VIRTUAL_TABLE builds.dan2018-11-28
| | | FossilOrigin-Name: 9bcdec85e21a5228c700f7373b92ae7ea14b585bcda34235b605be4f7ec15a15