aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
Commit message (Collapse)AuthorAge
* Omit unnecessary calls to table locking routines in the common case whendrh2023-06-20
| | | | | there is no shared cache. FossilOrigin-Name: f94f3021cde1d46373ee8fc8e5028d7507a937240c59cf0d0d19ab22acbd3c41
* Address various harmless compiler warnings fromdrh2023-06-16
| | | | | [forum:/forumpost/d526da8ee4|forum post d526da8ee4]. FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
* Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
| | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* 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
* Minor performance optimization in the computation of an affinity stringdrh2023-02-27
| | | | | for an index. FossilOrigin-Name: 07334aa17b6ded27c5bd353998d96645a94cdcf32440abb59d127a002cd98ce9
* Add a testcase() macro to verify that the case of a NOT NULL error messagedrh2022-11-30
| | | | | hitting the string length limit. FossilOrigin-Name: 91f50964c10fb12d889bda7d597d8edf475d97d2d8b534b4400e0fed1d753c6a
* Enforce column affinity on the materialization of a subquery or view.drh2022-11-01
| | | FossilOrigin-Name: b6692de374d7f489d8cf8877bdfef19501bc5ecb0781d42750807eeb58f2e7cd
* 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
* 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
* Performance optimization by only invoking sqlite3FkCheck() when it is actuallydrh2022-07-25
| | | | | needed. FossilOrigin-Name: 98b0e830bc7effa3c9cbb77aebe7c128afc3b210af336b7516108d6435705ba0
* In-line a call to sqlite3ExprCode() in insert.c, for a size reduction anddrh2022-07-25
| | | | | performance increase. FossilOrigin-Name: 35066b1446228bf030795e7868509c7b54a5681984ac28bf43123f8fac2e361e
* Small performance increase and size reduction by splitting out thedrh2022-07-25
| | | | | sqlite3VdbeGetLastOp() from sqlite3VdbeGetOp(). FossilOrigin-Name: 92ac01d41d46ab73e189b1e5596ea63e5edb5b15639c5d7bdb981b95366c069b
* Enhance the IdList object to exist in a single memory allocation (rather thandrh2022-04-15
| | | | | | a separate allocate for the base object and the array of IDs). Also permit an IdList object to store an Expr pointer together with each name. FossilOrigin-Name: 40f3c95871e6f40f287ef2756abafb8fc56dffdd0af69436e5c7d8e95022d94e
* Improvements to the display of AST for DML statements.drh2022-04-06
| | | FossilOrigin-Name: 84c239a071cfaf8af107646f01ef269e2915fd2384e95927d484f2e408ba6bbf
* 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
* Add new diagnostic "sqlite3TreeView" routines for IdList, Upsert, and fordrh2022-04-06
| | | | | | INSERT statements. This is all debugging code. There are no changes to release builds. FossilOrigin-Name: f3084122039bcb30c8617f5f432009a49be8b488235850a1f10ef862c91560b2
* 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