aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
Commit message (Collapse)AuthorAge
...
* Fix an assert() in sqlite3TableAffinity() that might have been false if theredrh2022-03-21
| | | | | was a prior syntax error in the query. FossilOrigin-Name: 23fdb169ca1622369cd44fd641946c37fef09071625838b3b9c86c31244ed205
* Add a comment linking a part of the UPDATE constraint checking code todrh2022-03-11
| | | | | one of the corresponding TH3 test cases. FossilOrigin-Name: 0606e8e93edb5de4d154f377dbf91f15295d25ca9013c0f1612ae6d63a0139ea
* Fix the Xfer-optimization on the INSERT statement so that it is omitted ifdrh2022-02-28
| | | | | | | there is a RETURNING clause, since that optimization is not able to deal with RETURNING. See [forum:/forumpost/595e132f71|forum thread 595e132f71] for details. FossilOrigin-Name: 1d3760a517b8bd2a6be82d2d5788945f49397cdc539fe28fd23e2c0c62a1dbe2
* Remove many redundant checks for sqlite3.mallocFailed now that any OOM shoulddrh2022-01-24
| | | | | cause Parse.nErr to be non-zero. FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
* Remove an obsolete assert() statement that no longer does anything usefuldrh2022-01-01
| | | | | | and which is not always true. Fix for PoC #1 of [forum:/forumpost/b03d86f951|forum post b03d86f951]. FossilOrigin-Name: c76a4c0b3cb625017ba09c8bccfcf1b5826df6873f1d3705d3345716079d5ec9
* Fix a faulty assert() statement - adding a CORRUPT_DB term - based on a testdrh2022-01-01
| | | | | | case derived from [562805cf488a455c]. Also add a test case to that prior issue. FossilOrigin-Name: 0dd6b5fccd554ebe4c0b081601863acd7b6ea81b51e14b508b23244f2a570e7e
* When a table has an INTEGER PRIMARY KEY ON CONFLICT REPLACE and some otherdrh2021-12-30
| | | | | | | | uniqueness constraint, and it participates in an upsert on that other constraint, ensure that code that checks for conflicts on the INTEGER PRIMARY KEY is well-formed. Fix for the problem reported by [forum:/forumpost/06b16b8b29f8c8c3|forum post 06b16b8b29f8c8c3]. FossilOrigin-Name: 2f09b51b1ff37bf98f958564cc1224968caa7e33147e6666b5c1ba20b2a7813b
* 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
* Remove two incorrect assert() statements added by a check-in from earlierdrh2021-11-03
| | | | | today. FossilOrigin-Name: 3206edff947b9edb485466f05b2baadf725d798229630c7e83e88c0b9ae278ca
* Fix INSERT into STRICT table with STATIC generated columns.drh2021-11-03
| | | FossilOrigin-Name: 24285d913678853213532d61aba077d576e3cd7629159e0a75dc3c16e54e2662
* Fix an incorrect assert() statement in sqlite3GenerateConstraintChecks().drh2021-10-30
| | | | | dbsqlfuzz 4190cff310aeab359a55f354e560db95d3a6f47d FossilOrigin-Name: 623c0d086bda135c49bfc238c31498facdcbe8ecc7659cc1af61594df0c6e899
* Minor changes to make it easier for static analyzers to reason about the code.drh2021-10-28
| | | FossilOrigin-Name: ba4104aa02625b51113978c1bb540b75bd88cb1959c7e9bfb4113db4159df5d4
* Protect all accesses to the FuncDef.u and Expr.u unions using nearbydrh2021-10-07
| | | | | assert()s or branches. FossilOrigin-Name: 9af863f065e0bef491c2ab7525194505f9516f4e6dfc789d2e3a9d2c2438533a
* Protect every access to the Table.u union using a nearby assert() or branch.drh2021-10-07
| | | FossilOrigin-Name: 50e08338aed7ac0cee600098d2ecd4b3b7bfd31a597bb26773badf3d2e2582c8
* Do not allow the xfer-optimization to move the content of an ordinarydrh2021-08-20
| | | | | table into a strict table. FossilOrigin-Name: 1ed1b594d3c03ced68eb2b1285dfd8b9641cda20db1b1b7ae1afee217a3a9fe2
* Improved comments. Fewer opcodes for integrity_check on strict tables.drh2021-08-19
| | | FossilOrigin-Name: 4ee57fb588b41ab76649c605f57c7bcf5b7b638435af458d69f69a8ccbb121e8
* Trying to insert an incorrect datatype into a STRICT table raises andrh2021-08-18
| | | | | | SQLITE_CONSTRAINT_DATATYPE error. Seems to work, though lots more testing is needed. FossilOrigin-Name: a19305e5cfedf5c472200d6e05c1396443e348f052a40a0979f860f2ff06851d
* Store the collating sequence name for each column of a table as andrh2021-08-05
| | | | | | extension to the column name, for an additional savings in the heap space needed to hold the schema. FossilOrigin-Name: 832ac4c1ee384be0de72a4bdd55ed87e0f8294e7df5eefcf6b4942db3d85a69e
* 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
* Refactor the Table object to reduce its memory footprint.drh2021-08-02
| | | FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
* Refactor the way that DEFAULT expressions are stored on columns, in orderdrh2021-07-31
| | | | | to save memory in the common case where the column has no DEFAULT clause. FossilOrigin-Name: 8646547e54211d44c415663c33775c4268550f8332949c4731a4bb6ec9cc663a
* Fix a (harmless) typo in a comment. No code changes.drh2021-07-03
| | | FossilOrigin-Name: d2b9b8daa3b87c3dba1329e2f2f44b60d6b5bb9a49d741045aa20cc7813446b2
* Add NEVER() to a branch that is no longer reachable due todrh2021-04-11
| | | | | check-in [a1d823f6879ce1ac]. FossilOrigin-Name: 5fda21feda2448de880088f4f53f20875ef02b47172c48091638b80173f983d7
* Also prohibit the use of rowid from a subquery. Add thedrh2021-04-07
| | | | | | SQLITE_ALLOW_ROWID_IN_VIEW compile-time option to restore legacy behavior in case somebody actually needs it. FossilOrigin-Name: 14b1d56ef84b0e62b7f9c4e5f7f985ca10e770c8db59f54004ad892c2a2dcbfb
* Silence an msan warning triggered by a corrupt database by initializing a ↵dan2021-04-06
| | | | | local variable in sqlite3Insert(). FossilOrigin-Name: f64deecee1691cf21b4f3d27d8490ecc8eae65cf26df7a22f8d15317f0cecd5b
* Handle "RETURNING rowid" clauses attached to INSERTs on views without ↵dan2021-04-06
| | | | | causing an assert() to fail. Fixes dbsqlfuzz crash 0081f863d7b2002045ac2361879fc80dfebb98f1. FossilOrigin-Name: 9c5b7386d013a7f22a93c69722c4648e2ab60eef180f48b5470bfea6fa74b3da
* Merge recent fixes from trunk.drh2021-03-22
|\ | | | | FossilOrigin-Name: 4a343698b4ec3364b0eecb7fa074512ecac8b586aff1f977ca77f215e96e0ce5
| * Fix an assert() that in preupdate-hook logic (not normally built) thatsame-as-3.35.3drh2021-03-21
| | | | | | | | | | | | can be false when running VACUUM on a corrupt database file under PRAGMA writable_schema=ON. FossilOrigin-Name: 6bb2134027a12801de8e0c73482d94682f902024800a7e426614f65a2fe4f64c
* | Merge enhancements from trunk.drh2021-03-19
|\| | | | | FossilOrigin-Name: d192d737755876293a2914fcb9a0d5efbe07f3cd281c038666ea5aa879c06321
| * Fix a crash that could occur when an INSERT has more than one ON CONFLICT ↵dan2021-03-19
| | | | | | | | | | clause, at least one of which contains an unresolvable symbol. FossilOrigin-Name: 74208386508012326a0e88ec5b4a995d1b99607720bb05785a01c2d89ea03543
* | Improved labeling of EXPLAIN QUERY PLAN output. Many test failures due todrh2021-03-19
|/ | | | | the different output format. FossilOrigin-Name: 6f8faec0222a7ca07cc1a5ed16cc08d92c6e20bbcb34851b4eff9e624de53601
* 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
* Avoid invoking the update or pre-update hooks during VACUUM operations.dan2021-02-18
| | | FossilOrigin-Name: 3c25cb4ab8885a50e2a485fe76f5ffd5dd8ebe1306aca8c0989e0b7fd7dd18d2
* Improvement to the INSERT optimization of check-in [16ac213c57196361] sodrh2021-02-18
| | | | | | that it works with SQLITE_ENABLE_HIDDEN_COLUMN but is also easier to maintain and a little faster as well. FossilOrigin-Name: f985a78ecc0c6d9ff671c730a109d97dc781b06e47a0ab03f441cea5d021a4c3
* Disable the optimization of [16ac213c57196361] when thedrh2021-02-18
| | | | | | SQLITE_ENABLE_HIDDEN_COLUMN compile-time option is used, as the optimization does not work in that case. FossilOrigin-Name: 5168b06bcf283ef64cb9fd76330a743baf8bb0cd747c14eae23e607e0491cbce
* Ensure that the pre-update hook is invoked for INSERT operations on WITHOUT ↵dan2021-02-18
| | | | | ROWID tables that use the xfer optimization. FossilOrigin-Name: 66bbad239b4527ac8ae8b487a0c71d88b1861a8dfe1edc25109600dc447c60c4
* Performance optimization in the code generator for INSERT for the commondrh2021-02-18
| | | | | | case where the target table has neither generated nor hidden columns. Also fix a redundant (and thus unreachable) branch in the resolver. FossilOrigin-Name: 16ac213c57196361a9d14df4c0d1ccc6f67ac522365b345ea364d1aec61fa3f2
* Remove dead code. Fix RETURNING for INSERT into a virtual table.drh2021-02-04
| | | FossilOrigin-Name: dbfa38699c87ab4bf390666e411dda8d375c7b53b9b4fb131adacbf575867a72
* 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
* Fix harmless compiler warnings seen with MSVC.mistachkin2021-01-18
| | | FossilOrigin-Name: dc7938d2d715301595dee2fac6880af3716c4b3d1cbe7c3578d7fd30ba146a23
* Fix a potential use-after-free following an OOM in sqlite3ParserAddCleanup()drh2021-01-12
| | | | | | and add a mechanism to detect situations where this might occur in the future. FossilOrigin-Name: 38ef8ab9830e12acd2c710e113939b1f8dced02612c6933c37a3c948a4030d0a
* Add a linked list of ParseCleanup objects to the end of a Parse object anddrh2021-01-11
| | | | | | | use that list as a place to put other sub-objects that need to be deallocated. Have a single such list for infrequently used sub-objects is more efficient than doing an a separate check for each kind of sub-object. FossilOrigin-Name: affa2b7b316941b8a6c4d0d1ff212c81a593faf1d05d129e14d2b70d73a25c59
* Do not set the P3 parameter on OP_RowCell when copying an index btree, asdrh2020-12-29
| | | | | P3 is not used in that case. FossilOrigin-Name: eef070a4aadf02a845d0ed00767be049d3b76e811e24797a116776fa836d1b03
* Fix a couple spelling typos in comments.mistachkin2020-12-22
| | | FossilOrigin-Name: 907ddf86766ebdbe39bdc89543c1a7bbd65c710c9f3a3a4d796845b2c02b711b
* Enhance UPSERT so that it allows multiple ON CONFLICT clauses and doesdrh2020-12-14
|\ | | | | | | | | not require a conflict target for DO UPDATE. FossilOrigin-Name: 6b01a24daab1e5bcb0768ebf994368d941b1dfc217bf6b661211d900331e68cf
| * New test cases with corresponding bug fixes.drh2020-12-12
| | | | | | FossilOrigin-Name: f22c21a94ca4cad0217f91c1a5a275bc348cb6ba0f3a54c927533bc8d8c96a90
| * Begin adding test cases. Fix one bug found so far. More are pending.drh2020-12-11
| | | | | | FossilOrigin-Name: aadd67ddf2a191629b5356395f75e4556aac904a6e2f6b83742fa4f26e4253a4
| * Small performance tweaks.drh2020-12-11
| | | | | | FossilOrigin-Name: 5321d60c575ef8f888d1b315df02cf9ed96a3ffc61babbc1429aa73b2a61a190
| * Bug fixes so that legacy tests pass. New tests for new functionality havedrh2020-12-11
| | | | | | | | | | not yet been added. FossilOrigin-Name: aa76790e58cea9a2b707f5912fd66c76545e7417442553fc13c87f773a2fe1dd