aboutsummaryrefslogtreecommitdiff
path: root/src/upsert.c
Commit message (Collapse)AuthorAge
* 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
* Silently ignore redundant ON CONFLICT clauses in an UPSERT. Only the firstdrh2024-03-08
| | | | | | | 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:/forumpost/919c6579c8|forum post 919c6579c8]. FossilOrigin-Name: d0ea6b6ba64dba9d68c2b391ccf1171ea96fcdd7409dafdb2b697accb00246b8
* Do not allow bound parameters in the ON CONFLICT clause of an UPSERT.drh2023-08-17
| | | | | dbsqlfuzz 9983e2c77634a8ccf33b5c91fa9982599de5f9e9 FossilOrigin-Name: 3c06709335eb4b98e3a684e3ebbae69eeb6a21b452bce29159c82bb632d6a042
* This experimental branch attempts to use columns for an index-on-expressiondrh2022-10-13
| | | | | | in place of the expression that is being indexed. This particular check-in mostly works, but there are still issues. FossilOrigin-Name: 2e8d4fd4cfd9e82f33c707ba246fe2bb3ca01762cf5ac5905058fbc7adf0abe7
* Refactor field names in the Column object, zCnName and zCnColl, to make themdrh2021-08-02
| | | | | unique and thus easier to find amid all the other code. FossilOrigin-Name: 8b781dcaf68e0cf12a844708c82eee00193e340195cbca915d077e4846983bf3
* Minor changes for test coverage.drh2020-12-14
| | | FossilOrigin-Name: e5a8fa50f4e5e5c24664452eda4af80904f75e5123b8f84353347dbd505d416d
* New test cases with corresponding bug fixes.drh2020-12-12
| | | FossilOrigin-Name: f22c21a94ca4cad0217f91c1a5a275bc348cb6ba0f3a54c927533bc8d8c96a90
* Logic is in place to handle multiple ON CONFLICT clauses, but it does not work.drh2020-12-11
| | | | | | Any use of ON CONFLICT will likely lead to memory faults. This is an incremental check-in to save my place. FossilOrigin-Name: 155142314feb007d526f8f67723636fd50dc52d1cd4d3a67dd93b105c9d5c2be
* Use an iterator for the index loop in sqlite3GenerateConstraintChecks().drh2020-12-10
| | | | | | The idea is that this iterator can be enhanced to traverse the indexes in any order, as required by multi-index UPSERT. FossilOrigin-Name: 64a4a91ecc5dcde3fa07d3cf038c74b9ede63d36628ecfb35203a9dfbbfe113c
* The DO UPDATE code generator searches for the correct ON CONFLICT clause todrh2020-12-10
| | | | | use. FossilOrigin-Name: a47e35ee2d901baaa37e7229d190f934e1b0bd3510147cd4a2a49c4a1411416a
* For upsert, the constraint check code generator uses a copy of the index listdrh2020-12-09
| | | | | for the target table, which can potentially be reordered. FossilOrigin-Name: 3194c00c2c6a32bdfd5acc9fda5b38ae131d20cd3b7aea8512a41b2e76808f6a
* Enhance UPSERT parsing to allow multiple ON CONFLICT clauses. Only thedrh2020-12-08
| | | | | | very last clause may omit the conflict target, but the conflict target may now be omitted for the DO UPDATE resolution. FossilOrigin-Name: 2ca62f4c71df6544cb8039bdc80e3701d09697c38800534371f6d44532fcffae
* If an UPSERT can cause an Abort due to a constraint failure, make suredrh2019-12-26
| | | | | the query planner knows this. Ticket [7c13db5c3bf74001]. FossilOrigin-Name: f14ce948662f3445a06d84d4f32d9b81143e0cffaf773d8aa4d3a609bfb9682b
* Refactor names of column index transformation functions, for clarity.drh2019-10-19
| | | | | Get generated columns working with ALTER TABLE RENAME COLUMN. FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
* Make sure OP_RealAffinity has been applied to all columns of type REALdrh2019-08-30
| | | | | | in the excluded.* pseudo-table of an UPSERT. Ticket [5a3dba8104421320] FossilOrigin-Name: 67381dadede98a55d8d9e085d021e6fa6473071978967b6302e03b28cf2245e1
* Fix various harmless warnings generated by static analysis tools.drh2018-08-21
| | | FossilOrigin-Name: a04a0ea9e30e0ef12bafa0b90b7d1b7764865768bb4a738b0c73a7a3ef9416db
* When compiling with SQLITE_DEBUG, add run-time checks to ensure that nodrh2018-05-28
| | | | | | statement aborts unless either there have been no writes or else there is a statement journal. FossilOrigin-Name: 5a4542dbcf17a9f7fed600897555c271e1651fd50eb41d0b126725b486e1d14c
* Fix a VDBE comment on upsert. Provide an error message when upsert detectsdrh2018-04-20
| | | | | index corruption. FossilOrigin-Name: 279c48f6061f766f5437edd6964c0dd1e10399314eb17b6e5ee34df925a776ed
* Improved VDBE comment on UPSERT code.drh2018-04-20
| | | FossilOrigin-Name: 131ed95e1452a5b0d92341c48a5d3915b328ccfce2cf605f702428ae7ee3e21b
* Avoid unnecessary cursor seeks during upsert processing.drh2018-04-20
| | | FossilOrigin-Name: 7c4b6d5475092a3e205f01a6972366e27a404568e8e7ba327f2feefac2ce2c7c
* Enhance UPSERT so that the UPDATE uses the same set of cursors as the INSERT.drh2018-04-20
| | | FossilOrigin-Name: c37f39d18d41ae5ba6c4561d87cbbf71f3b6896b86cc5cff9cdf046b02dc521a
* Minor simplification to the upsert logic.drh2018-04-19
| | | FossilOrigin-Name: e657c1d60f5fca9464e9bcab24bc328855bec9986e0a029877f639355da4b201
* Improved matching of COLLATE clauses within the ON CONFLICT conflict-target.drh2018-04-18
| | | FossilOrigin-Name: 8f4376e52b6124986937a3837ad83a18863c3144ef3b438a0d5e9231bf6c8980
* Remove unreachable branches. 100% MC/DC in TH3 now.drh2018-04-17
| | | FossilOrigin-Name: 558865d5c3c297155e1be5ea73effb46a995ea146bd745b23330c94782c6c45b
* 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
* Get upsert working on WITHOUT ROWID tables.drh2018-04-14
| | | FossilOrigin-Name: d3c53fd3177946f50137d48da871de43d78d10ef9990cc4ea6750f7020f89b6a
* 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
* Get the conflict-target clause parsing working correctly, with testdrh2018-04-13
| | | | | | cases. This change involves an enhancement to sqlite3ExprCompare() which needs to be reviewed on trunk prior to merging. FossilOrigin-Name: 5bf704256206f84b3db7a5d8523215604eeb218ef8db86316d1e43ecd7248d6a
* Improved conflict-target matching logic.drh2018-04-13
| | | FossilOrigin-Name: 98d32ba661f4ba662b639994b74352b695d53a33bc8a498bd09b9e02f794c81e
* 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
* Break out the upsert code into a separate source file.drh2018-04-12
FossilOrigin-Name: 389806b05f163687d8eb858b0f87f9a2d02e90af9f2097924a66715f05177613