aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
Commit message (Collapse)AuthorAge
* Enforce judgmental typing on STORED generated columns for STRICTdrh2025-06-18
| | | | | tables. [forum:/forumpost/6caf195248a849e4|Forum post 6caf195248]. FossilOrigin-Name: 5e9279bff0482806f86657ae05ca3e916708d138bc3c3ceb3fbf454818649d44
* Remove unnecessary "www." prefixes on domain names in URLs.drh2025-04-10
| | | FossilOrigin-Name: 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6
* Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would needdrh2025-02-21
| | | | | | to use more than SQLITE_LIMIT_COLUMN columns and raise an error. Also include some unrelated compiler warning fixes. FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3
* Use the sqlite3ColumnIndex() routine to look up a column in a table, ratherdrh2025-02-08
| | | | | | than using a custom loop. Performance improvement, size reduction, and complexity decrease. FossilOrigin-Name: 351dbbc2bf0b23efdc625ddaa5dc2239cf2990addf071a04bd41612b341de8c8
* Fix a harmless typo in a comment.drh2025-02-06
| | | FossilOrigin-Name: ed82272904deb37640286448e03153316f828c629547a615a504af1d7ec5a278
* Simplifh the IdList object to remove unnecessary fields. Performancedrh2025-01-28
| | | | | increases by about 0.8%. FossilOrigin-Name: a4625bb995dd5582d1f3cf0c2e54eb3f01f1cc1405811dda86ebd38b2b858994
* Use hashing to accelerate column matching on INSERT statements. Code isdrh2025-01-27
| | | | | smaller and about 1.8% faster overall according to test/speedtest.tcl. FossilOrigin-Name: 8be956383e0344fb613ec2e56fce7b518f439ae34bf9ddb424de2bd9b31c9889
* Tighter checking of access constraints on union members in SrcItem.drh2024-08-20
| | | | | Improved invariant checking. FossilOrigin-Name: fd72d3400a8fe5747f494eee81654698acee350bb95b9db269e87d857af03492
* Memory issues fixes so that mdevtest now passes.drh2024-08-20
| | | FossilOrigin-Name: b249516f6a6650808e035ec219e762bf24dcb7c32a6235984b995d08d07d35d8
* Refactor the SrcItem object so that information about subqueries is storeddrh2024-08-19
| | | | | | | | | in a separately allocated Subquery object. This reduces the memory requirements for SrcItem and makes the code run faster. It also provides an expansion path for subquery processing that does not burden simple queries. The current checking mostly works, but there are still issues that need to be tracked down and fixed. FossilOrigin-Name: 8ff5dda8448d7e1a533d7f27db2573ce68fa9956b9d9847ced45e83c1f06bab0
* 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
* Do not let the number of terms on a VALUES clause be limited bydrh2024-08-08
| | | | | | | SQLITE_LIMIT_COMPOUND_SELECT, even if the VALUES clause contains elements that appear to be variables due to the use of double-quoted string literals. [https://issues.chromium.org/issues/358174302|Chromium issue 358174302]. FossilOrigin-Name: 670beb133eb203065a75022f0c6db7c605a4e0e22c8ef6d6b4724be2663ff3dc
* The read-only CHECK-constraint optimization of [34ddf02d3d21151b] inhibits thedrh2024-04-09
| | | | | | | | | xfer optimization for tables with CHECK constraints. However, the xfer optimization is required for correct operation of VACUUM INTO on tables that contain generated columns. Fix this by ignoring CHECK constraints when qualifying the xfer optimization while running VACUUM. Problem reported by [forum:/forumpost/3ec177d68fe7fa2c|forum post 3ec177d68fe7fa2c]. FossilOrigin-Name: a6e26e778812c8409fca77183e24d3b70189c4d02fce10c7e74cd4ccc8c8ea97
* The RAISE() operator is not a constant expression and cannot participate indrh2024-03-25
| | | | | | the VALUE-as-coroutine optimization. dbsqlfuzz 74cf7c9904360322a6c917e4934b127543d1cd51 FossilOrigin-Name: 6a06dc73847716c88d65651d1bf0e002002303881df1389beac884d0032eae08
* Fix harmless compiler (scan-build) warnings.drh2024-03-18
| | | FossilOrigin-Name: c86f9f2a15ffc726b7f0d9bba5a8c4dfdaeea6a297e0b591c554fff3d1fe6e1c
* Allow the VALUES-as-coroutine optimization to be applied to later rows ofdrh2024-03-18
| | | | | a VALUES clause even if earlier rows do not qualify. FossilOrigin-Name: 9a47ea7f0f675f7bf4710901487ce34c7689e618cd1d8b9f94f0ff7ebc3f2841
* Add assert() statements to validate access to the SrcItem.u1.nRow union member.drh2024-03-18
| | | FossilOrigin-Name: 21f616d9b948efca441f8d45d0a95f4c052ce8b6daec7fa582ad9a00b82ca570
* Improvements to EXPLAIN QUERY PLAN output for multi-row VALUES claues.drh2024-03-18
| | | FossilOrigin-Name: ac6f095e13e43d66c06552c8b01f6bec3407c9d41a34c4cdb0be57b0b828ad0d
* Ensure the database schema has been loaded and the database encoding gleaned ↵dan2024-03-18
| | | | | before beginning to code a multi-row VALUES clause. FossilOrigin-Name: 2ff476eb3d1f4a2146f4a48b57895a00a3ff5beb29afa679ae53ea58cac07c76
* Add an ALWAYS on an unreachable branch.drh2024-03-17
| | | FossilOrigin-Name: 0dce6211690210e802545cbca9b3375e07075e117fad3f8c921879da7671d981
* Enhance the sqlite3ExprIsConstant() function so that it recognizesdrh2024-03-16
| | | | | | constant functions. So far the enhancement only applies to the multi-row VALUES clause, but it could possibly be applied in many other places. FossilOrigin-Name: c9e0488c6c0135932b6e76b0f3f3acd69ef65327e0a54daa59777f35da1aef26
* Fix a problem with ALTER TABLE and correlated multi-row VALUES clauses.dan2024-03-14
| | | FossilOrigin-Name: d543c829ef74dbd64105bd757ca660e4f02e9ce562be4f1688a701fa535351c4
* Fix a problem handling "INSERT INTO ... SELECT ... UNION VALUES(...), (...)" ↵dan2024-03-14
| | | | | and similar statements. FossilOrigin-Name: e8a2a8198a97046ff376bc5d38e4bc0a24fcac79f5a0dadb9d29d953a862a012
* Avoid some OP_SCopy instructions in "INSERT INTO .. VALUES" statements that ↵dan2024-03-14
| | | | | insert more than one row in cases where the VALUES clause contains a value for all columns of the table. FossilOrigin-Name: 988f0ea70cd21b3194011e0cd1ddd4990a07669e0fd9c37afa48f69698ab7212
* Change the way parse.y handles multi-row VALUES clauses to save a few cycles.dan2024-03-13
| | | FossilOrigin-Name: 88d5bc91a52675d2a83748b79ad50de0e9732b2afd23107627bdc604f744d275
* Remove unreachable code from this branch.dan2024-03-13
| | | FossilOrigin-Name: 657c7b4f9df53e041a33cfad00ee2f507ac09c97a2ae61164bd189d660d167da
* Fix some OOM handling problems on this branch.dan2024-03-13
| | | FossilOrigin-Name: 2085c7f12a3916ec883c31795e29f2e2b6641c30ecf748cce9bff7b13b061d1f
* Ensure that if a multi-row VALUES cannot be coded while being parsed, the ↵dan2024-03-13
| | | | | SF_MultiValue flag is correctly set. FossilOrigin-Name: 94791824a6f04782aac6bc16c182685e2d6ebf5c688dc9f8d59e479c6fd5a40e
* Avoid creating a co-routine incrementally for a VALUES clause that has ↵dan2024-03-13
| | | | | affinities other than NONE. FossilOrigin-Name: 4229b12b327b05561dcf49b8585a66467d17d4e998b14eff65eb886f2434b53c
* Correctly initialize the SrcItem.iCursor field to -1 when creating a ↵dan2024-03-12
| | | | | co-routine from a multi-values VALUES clause. FossilOrigin-Name: c32953ff6d72910815eaff29ab1b790c412e1a741d02c03c5911dda0c08e5130
* Attempt to reduce the memory used by VALUES clauses in as many statements as ↵dan2024-03-11
| | | | | possible, not just INSERT. This branch still has problems. FossilOrigin-Name: 17d1f7cfabc7593d0725051b0c7c9619a23a482265f30f15ab9493fef5caeeb0
* 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
* 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