aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
Commit message (Collapse)AuthorAge
...
* 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
| * 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
| * 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
| * Initialize all terms in the ON CONFLICT clause stack.drh2020-12-09
| | | | | | FossilOrigin-Name: 5e683fd1cbde53f37cf8a2b1e981191e2b29e3376db554691767f33c37c7547e
* | Better integrate the changes on this branch with OP_Insert and OP_IdxInsert.dan2020-12-10
| | | | | | FossilOrigin-Name: 101cef14910d6e865a94bc870aed599321b893188062a9a61d70a9434992cf23
* | Transfer large index or WITHOUT ROWID records between b-trees when vacuuming ↵dan2020-12-09
| | | | | | | | | | without loading them into memory. FossilOrigin-Name: dfd4ca6891a893d0e9551689954d3e79114d5565f8a5264f96ad1d64fe1d6280
* | Experimental changes to vacuum to avoid loading large records entirely into ↵dan2020-12-08
|/ | | | | memory. Currently only works in limited cases only - for rowid tables when the page-size does not change. FossilOrigin-Name: c90e063ca9ddcdd1e9f1a2e25a3f7d6e7ee798373ad8acf65b90536b0a124c0d
* Fix a couple of unreachable branches.drh2020-08-28
| | | FossilOrigin-Name: f2d26f2b11317abd4f993faa1a4df7afcd1a2d4e448ecc69ca05e9ebf102cd62
* Remove more unnecessary sqlite3GetVdbe() calls, replacing them with assert()s.drh2020-08-15
| | | FossilOrigin-Name: b7dc932197665f0ebde3ffb8f0785c22da07ce307cfd5f0eab69e86e4b38fcde
* Avoid unnecessary calls to the sqlite3GetVdbe() routine. Add assert()drh2020-08-15
| | | | | statements to prove each call is unnecessary. FossilOrigin-Name: 86d3790caf92e9cb7a9aaaa110f309b4b6945ac30cfd53fc3e5aa1ec3075ada5
* Fix harmless compiler warnings that surface in newer versions of GCC.drh2020-08-10
| | | FossilOrigin-Name: 9d670a318381f219b467653f5f9539097808b887ae37291ce13be462dedfb18d
* Fix signed/unsigned compiler warnings.drh2020-07-29
| | | FossilOrigin-Name: 1d69eee8b085d514f442840346f001b4785f8ec64f5ba66943e9577b26e2e29c
* Further refactoring of the schema table name.drh2020-06-19
| | | FossilOrigin-Name: 9536fa0ae0c1ae6e2e98d2fa11e5acda7f3c9b8ca5061b6f7f8cae63a11d936b
* Improved bytecode comment.drh2020-05-23
| | | FossilOrigin-Name: 9224f1543b51a674ad6d7db8e90d97e1b0d1abe68bed3417820ebd09d27270f9
* Further changes to ensure that expressions held in table and index definitionsdrh2020-03-10
| | | | | do not get passed down into code generator logic where they might be modified. FossilOrigin-Name: f45f5de000834da5b23cdcf12c3f0e3073287756afe06bdb77b95fb65b250258
* There is no need to keep track of the number of changed rows or of thedrh2020-02-06
| | | | | last-insert-rowid while running VACUUM. FossilOrigin-Name: a8a7c05b16f6c73ac55c359fbf62cae4a76eb0d105a3c53e9f47cede9fd85916
* Cosmetic change to the xfer-optimization to put the OP_RowData opcode closerdrh2020-02-03
| | | | | | to the corresponding OP_Insert opcode. This makes it slightly easier to read and understand the code. FossilOrigin-Name: 0ea2dbfc9088561d62c3456803cb08d357e4e60f1d21f6ed37315564be4957d3
* On an INSERT or UPDATE, perform affinity conversions on new data prior todrh2020-02-01
| | | | | running CHECK constraints. Ticket [86ba67afafded936]. FossilOrigin-Name: 1d4f86201dab9a22df9ef8175a7ebf3640e97cdb23a06fb454b4c69bfda3a9af
* Minor change for compatibility with the s390 architecture.drh2020-01-28
| | | FossilOrigin-Name: 04885763c4cd00cbca26d048f2b19316bfc93e8edebeceaa171ebfc6c563d53e
* Fix #ifdefs so it compiles cleanly with all SQLITE_OMIT compile-time options.drh2020-01-17
| | | | | Update compile-time option testing. FossilOrigin-Name: 7584e4b649d57767aac3906da6b06549d5b772aaa69f469c623ae5da834d54d5
* Merge the latest enhancements from trunk.drh2020-01-02
|\ | | | | FossilOrigin-Name: bd57e6d923d3b04f0a07aaf18bf389d2b2b7efc7c57e8cb37e6ef910662d8397
| * Have the OP_ReleaseReg opcode also invalidate the registers if P5 is non-zero.drh2020-01-02
| | | | | | FossilOrigin-Name: 937be22106f7e3f08712febd342d6cb81d129f2d5ab24ce80b3a5c3f9bbde54e
| * Issue OP_ReleaseReg opcodes against the array of registers used to computedrh2020-01-01
| | | | | | | | | | index records after the index record has been computed. FossilOrigin-Name: e3330861b4deab7c7cc09ad8b936d633c600b9fb4e274801efeaaf94e5c860b4
* | Merge recent enhancements from trunk.drh2019-12-31
|\| | | | | FossilOrigin-Name: 39d55579376906f212271ce9b2d367e3ad029fb173f22c7253312b467970208a
| * Do not allow triggers that run as part of REPLACE conflict resolutiondrh2019-12-29
| | | | | | | | | | | | | | during an UPDATE to modify the the table being updated. Otherwise, those triggers might delete content out from under the update operation, leading to all kinds of problems. Ticket [314cc133e5ada126] FossilOrigin-Name: db4b7e1dc399c1f16b827ac087aa37c0815f4b2f41f1ffad59963eead2ab5562
| * When an INSERT is receiving content from a SELECT, run an OP_ReleaseReg opcodedrh2019-12-28
| | | | | | | | | | | | at the top of each iteration of the loop in order to prevent spurious OP_SCopy misuse complaints. Ticket [de4b04149b9fdeae] FossilOrigin-Name: 6afadd3b3a40b0ef29fd14fb24c2a4b9479483e5f8b9125ce02d8daae662207f
| * Recompute the values for all generated columns after drh2019-12-28
| | | | | | | | | | | | NOT NULL ON CONFLICT REPLACE constraints fire. Tickets [37823501c68a09f9] and [5fbc159eeb092130]. FossilOrigin-Name: 4cc12c18860bc4801a407cf45e88e23d3d40391f01a461fbac2cac5f102100e1
| * Ensure that all ON CONFLICT REPLACE indexes are sorted to the end of the listdrh2019-12-15
| | | | | | | | | | | | | | | | of indexes for a table, even for weird cases where the same UNIQUE constraint occurs twice with the ON CONFLICT REPLACE clause only on the second one. This avoids an out-of-order contraint processing problem that can arise due to the optimization of check-in [469a62ca33081854]. FossilOrigin-Name: 1e3918ca2f2c1cfcfa44249b1d7b847d52cbb8d302a8d4a335c090cfdf22d7a1
* | Change the name of the Expr.a.zName field to zEName, so that it has a namedrh2019-12-12
|/ | | | | | that is distinct from other fields and variables and is hence easier to grep for. FossilOrigin-Name: d3783357f8fa76c42a86f12b214522f0388c37773c36ab8c5ce0623abbc4436a
* Set the affinity of regular columns prior to computing the values ofdrh2019-12-10
| | | | | generated columns. Ticket [d7c3f125c925c522] FossilOrigin-Name: d47d66e3d360d8aa6203a855228d2bc40d9a00d69c15f5066b7632d8fb1ed2cc
* Do not allow UPSERT of a view.drh2019-12-06
| | | FossilOrigin-Name: ebf897e861c19e214c57f1e73841b505182202cc8d7d39e24d5a1e5625e26b4a
* Fix an out-of-bounds array reference in the generated column logic.drh2019-11-21
| | | | | Problem discovered by valgrind. FossilOrigin-Name: a0ab42f779b9a96f4e43879210dfaba8fa593de77fc0ec0e2e6f116d9301ea59