aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
Commit message (Collapse)AuthorAge
...
* Fix the handling of "PRAGMA count_changes=ON" with UPSERT. Also improveddrh2018-04-19
| | | | | | the implementation of count_changes in other places, without changing the behavior. FossilOrigin-Name: c6f71115eb933c2aee295bc31e5139112463c28e15a3b3ea242fd9bac168aed9
* Fix a problem in the new upsert implemention, discovered by OSSFuzz.drh2018-04-19
| | | FossilOrigin-Name: b6d5ea59fe83716f464e408b7eef0310c6d30b3493e3f966362db2e30b36e821
* Add new testcase() macros and fix a bug that was revealed when trying todrh2018-04-18
| | | | | cover all the new test cases. FossilOrigin-Name: 266a99f7c068aadbd08157d1d495a428109ad7a32d872f8026e8db0f89c40f91
* Fixes to the logic for constraint check reordering during upsert.drh2018-04-17
| | | | | | Improved comments on constraint check bytecode. Add an assert that prevents the same label from being resolved more than once. FossilOrigin-Name: 1ddbb0ff5586ef5ca987e4309979f24f95eea883ed68937094a2db2d61e75657
* Simplification to the upsert logic.drh2018-04-17
| | | FossilOrigin-Name: f36d07a5b24cc48e3daa8b18dd34c50d9025c6c0ba019926610538b54f7b66ec
* Add some more simple test cases for UPSERT. And a minor fix.dan2018-04-17
| | | FossilOrigin-Name: 27cd3b2fb2ad0cf2b36741bd1057cb7973954d40456e9db158261a38b049d2b5
* Add support for the "excluded.*" names in the UPDATE clause of an upsert.drh2018-04-16
| | | FossilOrigin-Name: 0203f34faae07fbea0bff2d23b81fb37df8854cded4cdadac5a034132a096b6d
* Make sure constraint checks occur in the correct order, even in thedrh2018-04-14
| | | | | presence of upserts. FossilOrigin-Name: 07fb30c3de7ff396ae2ce8a0d20352b56f17a5db0af99a921c7bfe9bd4018115
* First cut at logic to perform DO UPDATE for rowid tables.drh2018-04-13
| | | FossilOrigin-Name: a9080bc8b8c5f3b399eb1819bb5009581f178d85bb2b2cca7bc16a7b81b06863
* Add infrastructure for doing an UPDATE as part of an UPSERT. Still no actualdrh2018-04-13
| | | | | UPDATE code, however. FossilOrigin-Name: 6d3017f92bce3e50a91fab2f605e2af8b913b1b374adbfd977299eb042683de8
* Merge the preupdate hook change from trunk.drh2018-04-13
|\ | | | | FossilOrigin-Name: 7353caabb31803ccff83fe188c4ee65e75c883de2beea79cbe17375a4a98d9ac
| * Remove an always-true branch from the preupdate hook logic.drh2018-04-13
| | | | | | FossilOrigin-Name: 0ab4518811b23bdb57feba55014cef07de66028f8fcbf8cf0831a712b2954b91
* | Get the ON CONFLICT DO NOTHING form of upsert working by mapping itdrh2018-04-13
| | | | | | | | | | into INSERT OR IGNORE. FossilOrigin-Name: d07f05e98bb9ce0f9b46db159d9df161b7499d6face6a5299ecd2d00a94fb8d0
* | Back off of the extended upsert syntax that allows multiple ON CONFLICTdrh2018-04-13
| | | | | | | | | | | | clauses. The syntax now is exactly as in PostgreSQL and MySQL. Add support for WHERE clauses on the conflict-target phrase, for partial indexes. FossilOrigin-Name: 2c1b1987d8de1efa8ed7e1f199710e32ff20edf8ceec570514fc63bb1ef264e0
* | Begin adding upsert logic. This is an incremental check-in.drh2018-04-13
| | | | | | FossilOrigin-Name: 809696434097e62e8ef486c7478b5eb62c0cf1342522a5584939fade82821410
* | Add the Upsert object for holding upsert clause information.drh2018-04-12
| | | | | | FossilOrigin-Name: d83eaed539b274c2abd650d07522f491865d4917acbb64d05d01b3ba5c3cd446
* | More complete parsing of UPSERT, including UPSERT within a trigger.drh2018-04-07
|/ | | | | | The sqlite3Insert() logic to actually perform the UPSERT is not yet implemented, however. FossilOrigin-Name: 5cc2a5a315a2f26b392811de45b3dc352873a173c2c6c65f37ce2e5f88a71cd2
* Avoid writing the sqlite_sequence table when it has not actually changed.drh2018-03-16
| | | FossilOrigin-Name: 3e3849a9d1a06673e6c713a42194f5da339fbf6533fa418c38f63d09bc045867
* In the constraint resolution logic, be careful not to cache column values drh2018-01-02
| | | | | | in registers whose initialization might be bypassed by an OP_NoConflict opcode. Fix for ticket [dc3f932f5a147771] reported by OSSFuzz. FossilOrigin-Name: 2846458af5d029a8e4fdcc8f50873a44e57897bbfe6aee8a23a01ffc34c5579f
* In the parse tree, combine LIMIT and OFFSET into a single expression rooteddrh2017-11-14
| | | | | | on a TK_LIMIT node, for a small code size reduction and performance increase, and a reduction in code complexity. FossilOrigin-Name: 3925facd942c9df663f9b29b1e6f94f6be14af8c2b99eb691bfc836b4c220826
* Remove unnecessary NEVER() and ALWAYS() conditionals.drh2017-10-31
| | | FossilOrigin-Name: 1c80c75d4be2f3d44fb18bb4c07eccac2aba79b688215a741317dfc47dc7c2ce
* Remove an unused variable from sqlite3Insert() and fix harmlessdrh2017-10-03
| | | | | compiler warnings associated with -DSQLITE_MUTATION_TEST. FossilOrigin-Name: 7be760e907274131bcd4acfaff9e72c9c59a05e7d411db3d9afe690fe0d64b4b
* Split the OP_Last opcode into OP_Last and OP_SeekEnd. Use OP_SeekEnd todrh2017-08-01
| | | | | position a cursor prior to appending. Ticket [cb91bf4290c211d]. FossilOrigin-Name: 3e02474c7bbe16891a7cfc8771cf72f64cd2c0692779037982d7d307512a4f23
* Add the new sqlite3.mDbFlags field. Factor out bits of sqlite3.flags thatdrh2017-07-26
| | | | | do not interact with PRAGMA statements into sqlite3.mDbFlags. FossilOrigin-Name: 3808a00f06d372cc531da039d97bd974e4a6576a30cf63bf562f83f186b313b3
* Combine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.drh2017-07-20
| | | | | | | This fixes a problem with date/time functions in check-constraints. Add some test cases for date/time functions in index expressions and check constraints. FossilOrigin-Name: 22eda0985ecd1f456c073e6ad735a8417f3ff1fb6aaad1640e1cec01e50c51d8
* Consider the values bound to SQL variables when determining whether or not adan2017-06-24
| | | | | partial index may be used. FossilOrigin-Name: 7b59c353b805c64689b4ae9df347705acbb5f116346ad77af8ce087da7893747
* Initialize a variable to zero to prevent an (incorrect) compiler warning ofdrh2017-06-03
| | | | | it potentially being uninitialized. FossilOrigin-Name: 65182ce041b30cd0193b958eca975b720fe5200a868baba1e633e49433d86813
* Remove a completely unnecessary memset() from the INSERT code generator.drh2017-05-31
| | | FossilOrigin-Name: 7d58836b9db1293a3a6581af4358b7c91a588efd5c9b2df384803f3855ff87a8
* Remove an invalid assert() statement failing when VACUUMing a database thatdan2017-03-23
| | | | | contains an index on a column explicitly declared "COLLATE BINARY". FossilOrigin-Name: 9f2e04d3c3526b5ff60d941aa6d5446f602cab37cb93972937f39eefabd6868d
* Always use the IsVirtual() macro to determine if a Table object is a virtualdrh2017-02-16
| | | | | table. Slightly smaller and faster code. FossilOrigin-Name: 6affb1c89d87288cad87dde5a533832cdf06b8aa
* Enable the SQLITE_ENABLE_NULL_TRIM option for WITHOUT ROWID tables.drh2017-02-14
| | | FossilOrigin-Name: 54836270c9c0bfa5910f7ad74ec238b9d7ddee5f
* Experimental change to invoke the preupdate hook when WITHOUT ROWID tables aredan2017-01-30
| | | | | written. FossilOrigin-Name: 856f8604c59c8fdd9bfb7d86fc0e212f091ab49a
* Trim NULL values off the end of records when the SQLITE_ENABLE_TRIM_NULLSdrh2017-01-25
|\ | | | | | | | | | | compile-time option is used. Increase the size of the P5 operand to 16 bits. Fix a problem with short records in the sessions extension. FossilOrigin-Name: 4801bd59a01dcc11a3eb9e776e7599b36f162d2a
| * Experimental enhancement to automatically trim NULL values from the end ofdrh2017-01-25
|/ | | | | | records, for a reduced disk footprint. This change also involves increasing the P5 operand from 8 to 16 bits. FossilOrigin-Name: 118ded403b95050b74ae2b03919c43d614094a32
* Changes to allow some multi-row UPDATE statements to avoid the two-passdan2017-01-10
| | | | | approach. FossilOrigin-Name: 46db23ccd116ce5b9d949f9293be8a2818411b46
* Modify the OP_RowData opcode so that when P3!=0 it is allowed to hold andrh2017-01-09
| | | | | | ephemeral copy of the content. This avoids unnecessary memcpy() operations in the xfer-optimization and VACUUM. FossilOrigin-Name: 6e106acd74da3baa5c308a76443d2f0a7c904e5e
* Improvements to the iIdxNoSeek optimization of sqlite3GenerateRowDelete()drh2017-01-07
| | | | | | so that it is automatically disabled for BEFORE triggers but works in all other cases. FossilOrigin-Name: 3178ec4c27efc4ff84bcd17ddb17ec50a6ac96b3
* Critical fix to the previous check-in so that it works when there aredrh2017-01-07
| | | | | | BEFORE triggers that move the cursor before the OP_Delete has a chance to be applied. FossilOrigin-Name: db2c0960ffb3b396b20e0441d3edb812254c82bc
* Avoid an unnecessary btree seek while deleting an index entry due to a conflictdrh2017-01-07
| | | | | on a REPLACE operation. FossilOrigin-Name: f0495c5133d0dc04d63521136d6b9ca440792cdf
* Fix some problems with foreign key processing within REPLACE ops on WITHOUTdan2017-01-05
| | | | | ROWID tables with no triggers or auxiliary indexes. FossilOrigin-Name: c1220b1af62629d7fc2178512786d613cd7ea711
* Improved the comment on the block of code the provides the performancedrh2017-01-04
| | | | | | optimization originally added by check-in [925840cfdb]. The original check-in omitted condition 4, which was the cause of bug [30027b613b]. FossilOrigin-Name: c6506b82aa6583ccde5f673c79526d5f3920b67a
* Possible fix for 30027b61. There may still be problems surrounding foreign keydan2017-01-04
| | | | | processing. FossilOrigin-Name: 71ccb1f4c490fdebc7008e884384e7809b849742
* More changes to take advantage of the sqlite3VdbeAppendP4() method.drh2016-12-08
| | | FossilOrigin-Name: 83bc5e40af9b20afeed008bf3e2669b7ac9e2dc8
* Add the sqlite3VdbeAppendP4() method for adding P4 content to the most recentlydrh2016-12-07
| | | | | coded instruction. FossilOrigin-Name: 28883e8f3e92a8015fb5f6c8ae8580833931543d
* Remove the OP_RowKey opcode. Use OP_RowData in its place.drh2016-11-25
| | | FossilOrigin-Name: 6ac7b07a4aff2e1a9031289e3dafdb9ac0071c24
* Remove unnecessary OP_Close opcodes at the end of INSERT operations, resultingdrh2016-11-21
| | | | | in smaller and faster code. FossilOrigin-Name: abeddb6d5a4040e1d0a87a4f32ad79794ba0842b
* Fix harmless compiler warnings.drh2016-11-20
| | | FossilOrigin-Name: b3b7b42d9a4a0e7e2be8b2933328a7bec2f49a81
* Make the VACUUM command about 9% faster by avoiding unnecessary callsdrh2016-11-15
| | | | | to sqlite3BtreeMovetoUnpacked() while copying rowid tables. FossilOrigin-Name: 5ed0bd387699a0f3b477d4f3cfcb460a6a44cb84
* Avoid unnecessary calls to sqlite3ExprCacheAffinityChange() when generatingdrh2016-11-14
| | | | | OP_MakeRecord opcodes that do not change any register affinities. FossilOrigin-Name: e211c579b2f092e3283edd5fb9add7c5183bac35
* Remove obselete and unused logic in the update code generator.drh2016-11-11
| | | | | | Fix the sqlite3BtreeMovetoUnpacked() routine so that it remembers the rowid of the row that it landed on. FossilOrigin-Name: 1a587d72f981cb7064cfd8916a52a83ad9ba6074