SQLite

All files named ”src/upsert.c”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History for src/upsert.c

2024-08-17
23:23
[215328c3f9] part of check-in [9f5aeef3cb] Give unique names to fields in the SrcItem object, to facilitate analysis of how those fields are used using "grep". (check-in: [9f5aeef3cb] user: drh branch: srcitem-opt, size: 11526)
2024-03-08
14:01
[2e60567a0e] part of check-in [d0ea6b6ba6] Silently ignore redundant ON CONFLICT clauses in an UPSERT. Only the first ON CONFLICT for each index is active. Do not issue an error, since that might break legacy queries. But ignore the redundant ON CONFLICT clauses to prevent problems such as described in forum post 919c6579c8. (check-in: [d0ea6b6ba6] user: drh branch: trunk, size: 11524)
2023-08-17
17:48
[fa125a8d34] part of check-in [3c06709335] Do not allow bound parameters in the ON CONFLICT clause of an UPSERT. dbsqlfuzz 9983e2c77634a8ccf33b5c91fa9982599de5f9e9 (check-in: [3c06709335] user: drh branch: trunk, size: 10899)
2022-10-13
21:08
[5303dc6c51] part of check-in [2e8d4fd4cf] This experimental branch attempts to use columns for an index-on-expression in place of the expression that is being indexed. This particular check-in mostly works, but there are still issues. (check-in: [2e8d4fd4cf] user: drh branch: index-expr-opt, size: 10904)
2021-08-02
18:03
[8789047a8f] part of check-in [8b781dcaf6] Refactor field names in the Column object, zCnName and zCnColl, to make them unique and thus easier to find amid all the other code. (check-in: [8b781dcaf6] user: drh branch: trunk, size: 10868)
2020-12-14
13:52
[df8f1727d6] part of check-in [e5a8fa50f4] Minor changes for test coverage. (check-in: [e5a8fa50f4] user: drh branch: generalized-upsert, size: 10866)
2020-12-12
00:28
[5ebb702817] part of check-in [f22c21a94c] New test cases with corresponding bug fixes. (check-in: [f22c21a94c] user: drh branch: generalized-upsert, size: 10859)
2020-12-11
01:17
[6471d9e0e5] part of check-in [155142314f] Logic is in place to handle multiple ON CONFLICT clauses, but it does not work. Any use of ON CONFLICT will likely lead to memory faults. This is an incremental check-in to save my place. (check-in: [155142314f] user: drh branch: generalized-upsert, size: 11156)
2020-12-10
20:31
[4b96096808] part of check-in [64a4a91ecc] Use an iterator for the index loop in sqlite3GenerateConstraintChecks(). The idea is that this iterator can be enhanced to traverse the indexes in any order, as required by multi-index UPSERT. (check-in: [64a4a91ecc] user: drh branch: generalized-upsert, size: 10420)
12:49
[4917053257] part of check-in [a47e35ee2d] The DO UPDATE code generator searches for the correct ON CONFLICT clause to use. (check-in: [a47e35ee2d] user: drh branch: generalized-upsert, size: 10421)
2020-12-09
20:30
[803c383d49] part of check-in [3194c00c2c] For upsert, the constraint check code generator uses a copy of the index list for the target table, which can potentially be reordered. (check-in: [3194c00c2c] user: drh branch: generalized-upsert, size: 9959)
2020-12-08
14:29
[25673d007c] part of check-in [2ca62f4c71] Enhance UPSERT parsing to allow multiple ON CONFLICT clauses. Only the very last clause may omit the conflict target, but the conflict target may now be omitted for the DO UPDATE resolution. (check-in: [2ca62f4c71] user: drh branch: generalized-upsert, size: 9948)
2019-12-26
23:40
[2920de71b2] part of check-in [f14ce94866] If an UPSERT can cause an Abort due to a constraint failure, make sure the query planner knows this. Ticket [7c13db5c3bf74001]. (check-in: [f14ce94866] user: drh branch: trunk, size: 9047)
2019-10-19
13:29
[b445315c89] part of check-in [27ab41c910] Refactor names of column index transformation functions, for clarity. Get generated columns working with ALTER TABLE RENAME COLUMN. (check-in: [27ab41c910] user: drh branch: generated-columns, size: 9016)
2019-08-30
23:15
[710c91bb13] part of check-in [67381daded] Make sure OP_RealAffinity has been applied to all columns of type REAL in the excluded.* pseudo-table of an UPSERT. Ticket [5a3dba8104421320] (check-in: [67381daded] user: drh branch: trunk, size: 9011)
2018-08-21
12:16
[0dd81b4020] part of check-in [a04a0ea9e3] Fix various harmless warnings generated by static analysis tools. (check-in: [a04a0ea9e3] user: drh branch: trunk, size: 8782)
2018-05-28
17:31
[47edd408cc] part of check-in [5a4542dbcf] When compiling with SQLITE_DEBUG, add run-time checks to ensure that no statement aborts unless either there have been no writes or else there is a statement journal. (check-in: [5a4542dbcf] user: drh branch: stmt-journal-testing, size: 8746)
2018-04-20
18:01
[ae4a4823b4] part of check-in [279c48f606] Fix a VDBE comment on upsert. Provide an error message when upsert detects index corruption. (check-in: [279c48f606] user: drh branch: trunk, size: 8699)
16:49
[23b386d71a] part of check-in [131ed95e14] Improved VDBE comment on UPSERT code. (check-in: [131ed95e14] user: drh branch: upsert-opt2, size: 8617)
15:56
[4f1d04b8cb] part of check-in [7c4b6d5475] Avoid unnecessary cursor seeks during upsert processing. (check-in: [7c4b6d5475] user: drh branch: upsert-opt2, size: 8548)
13:18
[71ebb84f33] part of check-in [c37f39d18d] Enhance UPSERT so that the UPDATE uses the same set of cursors as the INSERT. (check-in: [c37f39d18d] user: drh branch: trunk, size: 9044)
2018-04-19
21:29
[ee5c9e44fa] part of check-in [e657c1d60f] Minor simplification to the upsert logic. (check-in: [e657c1d60f] user: drh branch: trunk, size: 9170)
2018-04-18
18:18
[ed50cfcf0d] part of check-in [8f4376e52b] Improved matching of COLLATE clauses within the ON CONFLICT conflict-target. (check-in: [8f4376e52b] user: drh branch: trunk, size: 8977)
2018-04-17
21:59
[3e152ac407] part of check-in [558865d5c3] Remove unreachable branches. 100% MC/DC in TH3 now. (check-in: [558865d5c3] user: drh branch: upsert, size: 8837)
18:16
[e83fd8c054] part of check-in [27cd3b2fb2] Add some more simple test cases for UPSERT. And a minor fix. (check-in: [27cd3b2fb2] user: dan branch: upsert, size: 8870)
2018-04-16
13:00
[5d94914121] part of check-in [0203f34faa] Add support for the "excluded.*" names in the UPDATE clause of an upsert. (check-in: [0203f34faa] user: drh branch: upsert, size: 8600)
2018-04-14
22:35
[3baeab51df] part of check-in [d3c53fd317] Get upsert working on WITHOUT ROWID tables. (check-in: [d3c53fd317] user: drh branch: upsert, size: 8591)
2018-04-13
21:55
[a82eacec45] part of check-in [a9080bc8b8] First cut at logic to perform DO UPDATE for rowid tables. (check-in: [a9080bc8b8] user: drh branch: upsert, size: 7877)
18:59
[bd9b5b48dd] part of check-in [6d3017f92b] Add infrastructure for doing an UPDATE as part of an UPSERT. Still no actual UPDATE code, however. (check-in: [6d3017f92b] user: drh branch: upsert, size: 6707)
14:27
[1535f4270f] part of check-in [5bf7042562] Get the conflict-target clause parsing working correctly, with test cases. This change involves an enhancement to sqlite3ExprCompare() which needs to be reviewed on trunk prior to merging. (check-in: [5bf7042562] user: drh branch: upsert, size: 6078)
13:44
[5012bea924] part of check-in [98d32ba661] Improved conflict-target matching logic. (check-in: [98d32ba661] user: drh branch: upsert, size: 5730)
13:06
[ae29d025a2] part of check-in [2c1b1987d8] Back off of the extended upsert syntax that allows multiple ON CONFLICT clauses. The syntax now is exactly as in PostgreSQL and MySQL. Add support for WHERE clauses on the conflict-target phrase, for partial indexes. (check-in: [2c1b1987d8] user: drh branch: upsert, size: 4950)
01:15
[c48c365ea2] part of check-in [8096964340] Begin adding upsert logic. This is an incremental check-in. (check-in: [8096964340] user: drh branch: upsert, size: 3836)
2018-04-12
21:42
Added: [8b1a4fc628] part of check-in [389806b05f] Break out the upsert code into a separate source file. (check-in: [389806b05f] user: drh branch: upsert, size: 2091)