aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
Commit message (Collapse)AuthorAge
...
* Fix the xferCompatibleIndex() function so that it recognizes that a PRIMARY KEYdrh2019-11-07
| | | | | | index for a WITHOUT ROWID table is different from a UNIQUE constraint index on the primary key. Ticket [302027baf1374498] FossilOrigin-Name: 34f64f11ca481996b1ff1686bdc5e278946635b6856cd1fe2355fce8e298e0f8
* Change the way generated columns are computed so that no column is computeddrh2019-11-06
| | | | | inside branch code that might not be taken. Ticket [4fc08501f4e56692] FossilOrigin-Name: 9e07b48934e9a972dcf62e3538b3b21ffa044c553feba0441675ac0bbe13bcb2
* Fix the handling of NOT NULL constraint violations for generated columns indrh2019-11-06
| | | | | a REPLACE statement. Ticket [2399f5986134f79c] FossilOrigin-Name: 77b1c90add514050fe62f22751362fecacd99f9775346cffc60e09c326e64e10
* Add a missing translation from table column numbers to storage table numbersdrh2019-10-29
| | | | | | while processing constraints on an UPDATE statement. Ticket [9621dd78a024d07a] FossilOrigin-Name: 361ea81ae8a13e7d2ec4c2412f30e049bb6ee320980d502c86bedc315cdd3bc0
* Remove code from the constraint checker that generates virtual column valuesdrh2019-10-26
| | | | | | | with the incorrect time. Turns out the the regular code for all other columns works correctly and so the incorrect special-case code is not actually needed. Fix for ticket [3ea175512444b0d1]. FossilOrigin-Name: 5b4c0f2ddc6f324e23bbde0ee3d1ab672cfe8ab5044c9b693f4c33cdd75c211e
* Remove redundant code resulting from a merge error on the previous check-in.drh2019-10-26
| | | FossilOrigin-Name: 713fe86b8c9f3c9ef8af952019e99ba2f4741326226264de6a66baaeb1803d2a
* Add support for generated columns.drh2019-10-26
|\ | | | | FossilOrigin-Name: b855acf1831943b3914491ed0bc333131321930cab480a5281012a3aebbba492
| * Merge fixes from trunk.drh2019-10-24
| |\ | | | | | | FossilOrigin-Name: 4ec57d88415fa4ea2e99d4a5671074ec6829d6824bc8509d5ae9c978d47d1419
| * | Minor adjustments for clarity and test coverage.drh2019-10-23
| | | | | | | | | FossilOrigin-Name: 30065716878d4058e75eb510b0b27b68e5193d04625eb173210de8061f20f499
| * | Fix incorrect arguments to testcase() macros.drh2019-10-23
| | | | | | | | | FossilOrigin-Name: 812467fbf04ce00228a8381a5eee471e4e35cc63184a4538129fcd70b7cec979
| * | Take the declared column time into account when computing the values fordrh2019-10-22
| | | | | | | | | | | | | | | generated columns, and apply appropriate affinity. FossilOrigin-Name: 9e04ba22dfce3998e61331ac229ff543ecccc590284c9dd5def21efbe594fba0
| * | New testcase() macros. Fix a problem with INSERT when the IPK is to thedrh2019-10-22
| | | | | | | | | | | | | | | right of generated columns. FossilOrigin-Name: 412799fc5527aaca987e4e04b8a4f774dcdb70fb80e3a126dc3a26d48a66935c
| * | Merge changes on trunk into the generated-columns branch.drh2019-10-22
| |\ \ | | | | | | | | FossilOrigin-Name: ba123b8c201053d8f9387de38f3513b06f7721b28d79fab8489f96d336105117
| * | | Changes to the INSERT logic to make it simpler and faster and so thatdrh2019-10-21
| | | | | | | | | | | | | | | | | | | | it works with generated columns and BEFORE triggers. FossilOrigin-Name: bc368cb090376d33d3844e3689c4f6bd19eed758e39b878ee67fef93b1c839ea
| * | | Work toward getting generated columns to work with triggers. Still moredrh2019-10-19
| | | | | | | | | | | | | | | | | | | | work to do in this area. FossilOrigin-Name: 932a37275d7e932f8237d32c8fc6087ed8cd342fe01ef2f7a43c7237ab84c9ac
| * | | Add testcase macros.drh2019-10-19
| | | | | | | | | | | | FossilOrigin-Name: fb9c9bb284d441bd7aa34c87b6fd8ce57d036c17623d82354154fc6286bdd134
| * | | Refactor names of column index transformation functions, for clarity.drh2019-10-19
| | | | | | | | | | | | | | | | | | | | Get generated columns working with ALTER TABLE RENAME COLUMN. FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
| * | | Merge trunk enhancements into the generated-columns branch.drh2019-10-18
| |\ \ \ | | | | | | | | | | FossilOrigin-Name: 85bc4524d76999080faa4474e8880d2b6a2ac3a7f6a76239af4de1a42f8138c8
| * | | | Get generated columns working for WITHOUT ROWID tables.drh2019-10-18
| | | | | | | | | | | | | | | FossilOrigin-Name: 9f409649ec4282a47f0a8b079b419f1922e0c24779b297f477ced168d5b7910d
| * | | | Get indexes working on virtual columns.drh2019-10-18
| | | | | | | | | | | | | | | FossilOrigin-Name: 450c48766c8e62653d074c95f69b0576de3880d183a1d1e5992d88b6fce6cc39
| * | | | STORED columns can now reference other STORED columns, in any order, as longdrh2019-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | as there are not loops. FossilOrigin-Name: 0d236698e64b2a4b46f91a25279c406e0bf392fe66116678456f0a034c11d7b4
| * | | | In the Table object, change the nVCol field to nNVCol - the number ofdrh2019-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | non-virtual columns, as that is the quantity that we need most. FossilOrigin-Name: 4ad66af04a654d92711d2d056ce8f35cd21eac4b99fb8d78be1a314620b6d29e
| * | | | Bug fix with INSERT using an explicit column list on a table withdrh2019-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | a non-final STORED column. FossilOrigin-Name: 61b4459ae6a6cc182c11abbc8b1dd629f77beb088d7ccad5e563d8d4769056df
| * | | | Some (but not all) INSERT and UPDATE statements now work for STORED columns.drh2019-10-17
| | | | | | | | | | | | | | | FossilOrigin-Name: fe7517bf4d360597576ab9aba29627d7926d23f2bbbfb3e7bf4d32761617574c
| * | | | Fix the xfer optimization for generated columns, so that VACUUM works again.drh2019-10-17
| | | | | | | | | | | | | | | FossilOrigin-Name: 8f67b89b04622c1509dc102a83be7a80057dc791625804fc2c294089c98b97e4
| * | | | Bug fixes so that "make test" once against runs with no errors.drh2019-10-17
| | | | | | | | | | | | | | | FossilOrigin-Name: 7bfe0f679d8951b3e925bdf549efa0f8d6b514eddeaca69cbfddbd9476cfff5f
| * | | | INSERT with named columns for a table with generated columns.drh2019-10-16
| | | | | | | | | | | | | | | FossilOrigin-Name: 64db39f92d68d1b9f23e48af35e16b969c38b58041fbe900066eeb3ddb291cef
| * | | | ALTER TABLE is able to add a VIRTUAL column.drh2019-10-16
| | | | | | | | | | | | | | | FossilOrigin-Name: 120c6b78cb51532f783014605f1107d40b2e4f54e3852fb1f8f167d0c0b78c69
| * | | | Simple INSERT and SELECT operations working with VIRTUAL columns.drh2019-10-16
| | | | | | | | | | | | | | | FossilOrigin-Name: 7f9f90b1b885fa9905b296f2e0fcc9b2341019b42fc839722a93cf60e49a9252
* | | | | Performance optimization on sqlite3GenerateConstraintChecks() - bypass thedrh2019-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loop that checks each column for NOT NULL constraints if it is known in advance that the table has no NOT NULL constraints. FossilOrigin-Name: e3c3f4d7872f431a95627d52553101388c1e39458cc7e7f93fc81255f49a89a5
* | | | | Clarify some comments and add assert() and testcase() macros to thedrh2019-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | replace-trigger recheck logic for ticket [c1e19e12046d23fe] FossilOrigin-Name: 8c0042bd5ccd83f8794d19cbb1ec7564584f0dce54bfebc0ada00b836aca065f
* | | | | Overnight, OSSFuzz helpfully pointed out a potential use-after-free bug indrh2019-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yesterdays changes, involving continued use of a pointer after the memory pointed to had been realloc()-ed. Thanks Google. FossilOrigin-Name: c422afb507dc875751e6a72e4ba5f4f0793097c0de4533c1600311f689e76ed7
* | | | | Add missing VdbeCoverage() macro. Fix an off-by-one error in partial indexdrh2019-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | handling. New test cases. Ticket [c1e19e12046d23fe] FossilOrigin-Name: 41cc8e3dab998f7efc898d18837ca7fdac94ea3f89954990c5231456bf725fee
* | | | | If replace triggers are run during uniqueness checking, then rerun alldrh2019-10-26
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | uniqueness checks a second time using the ABORT algorithm. Fix for ticket [c1e19e12046d23fe] FossilOrigin-Name: fbac0c65d8464b126d385262d176864add55452ec9e3d5eb76ffee06e820cb9c
* | | | Correction to check-in [bec5b6d4d083556d] so that it detects *all*drh2019-10-24
| |_|/ |/| | | | | | | | | | | | | | triggers that might perturb the insertion cursor. Ticket [50c09fc2cf0d91ce]. FossilOrigin-Name: 521f1d36282549488a47a434484a24924ee970d29f05a8ae499b7d536bcd692b
* | | Add a VdbeCoverage() macro that was omitted from check-in [eea1e7aa57e74c43].drh2019-10-21
| |/ |/| | | FossilOrigin-Name: cd2317d04c1c4bcf5fe63aa02a6051bdfae8f5566a098e3f45bf9ec1dd0c3ea6
* | If an AFTER DELETE trigger fires when a conflict row is deleted by REPLACEdrh2019-10-16
|/ | | | | | | conflict resolution, make sure the conflict really has been resolved and that the trigger did not recreate the row before continuing. Ticket [a8a4847a2d96f5de] FossilOrigin-Name: eea1e7aa57e74c4329003f4550168e2aed9e33d2301a3ba84b10781a9cebbc1b
* When the affinity of a table column is INT or REAL, make the affinity ofdrh2019-08-30
| | | | | | | corresponding index columns NUMERIC. This increases the precision of index lookups for large numbers so that it matches the precision of ordinary comparison operators. Ticket [40812aea1fde9594] FossilOrigin-Name: e0d909c740b774d8a46731696e33342be83206cc4a95d07f42fdb3d8cc2d7a8e
* Prevent NULLS FIRST/LAST from being used in CREATE INDEX and other statements.dan2019-08-19
| | | FossilOrigin-Name: bb9767a287097a615aeb4abdba689b10e1a1c36c016c8e55905b508075e62c86
* Use 0x40 (ASCII '@') instead of 0x00 to mean "no affinity" so that columnsdrh2019-08-06
| | | | | | with no affinity can appear in a zero-terminated string. Use the new SQLITE_AFF_NONE macro for this new magic number. FossilOrigin-Name: e8234f6939ccff4c10f741cf66d1c537cfebcbd0d1d79a618a64c755a7f087b5
* One of two options on how to address ticket [61c853857f40da49]. In thisdrh2019-08-05
| | | | | | | | mode, we back out the documentation change of [https://www.sqlite.org/docsrc/info/07b7749da88d54e5|[07b7749da88d54e5]] and change the core to work as it has been documented to work since 2017, rather than how it has actually worked since 2009. FossilOrigin-Name: 09cd0c0c6e6c963e0039a733876e5149adb3cd10e9b92699fa1dcb0633e997a4
* Adjust requirements marks and add new requirements tests.drh2019-06-12
| | | FossilOrigin-Name: ebb81dad1f43dac4636cd44d4055d1d4b198c675f73e23c5a2d8d992ae27fe1f
* On an INSERT or UPDATE, generate the new table record prior to runningdrh2019-05-07
| | | | | | | foreign key checks, in case the foreign key checks changes datatypes on the registers holding column values. Proposed fix for ticket [e63cbcfd3378afe6980d626]. FossilOrigin-Name: 3f1c8051648a341db4dffad66d3b1f9980d8a2b314cb0ce879cb2a10d1779b84
* Add the ability to override the new corruption detection logicdrh2019-04-05
| | | | | | of the previous checkin, in order to exercise downstream corruption detection during testing. FossilOrigin-Name: e859d3184606dd453b9fc4ee388922d7be4b61aad84a66ac82107935ffd56f3a
* In the xfer-optimization, do early detection of when the source and destinationdrh2019-04-05
| | | | | | index share the same btree, to avoid a long delay prior to reporting the database corruption. FossilOrigin-Name: af1e5873d44d31466023ae145bdfc6b4191eb48b62e5752c6e683bcf571980e7
* Only preserve rowid values for VACUUM INTO. Keep the legacy behavior ofdrh2019-04-04
| | | | | renumbering rowids for ordinary VACUUM. FossilOrigin-Name: 13a0ea6466b051ea5281865ed5285b8b5a99ec4307f400c5f7b03692723f1cd1
* Make all ephemeral tables built to hold the RHS of an IN operator bedrh2019-02-22
| | | | | | | index-btrees, never table-btrees, regardless of whether or not they are used as IN_INDEX_LOOP or IN_INDEX_MEMBERSHIP. That way, the same ephmerial table can be reused for both cases. FossilOrigin-Name: c2d50df8fd1a1fdae6226a3e77296ded09b53a74540caedd4868e686a93cbc10
* Always use the symbolic name SQLITE_IDXTYPE_PRIMARYKEY rather than a hard-codeddrh2019-02-19
| | | | | magic number 2. FossilOrigin-Name: 55d43adc894a6b1e0f77bf481dad6dd604a0dc0022e72bbf2e3037f97351971e
* Experimental change to VACUUM so that it preserves existing ROWID values.drh2019-02-07
| | | FossilOrigin-Name: f264015f84de51d74f681ba62a5f26bd859480d93e1eaf9e1018b3e9b4e0bea3
* Disable the xfer-optimization if the two tables have the same root pagedrh2019-01-17
| | | | | due to schema corruption. FossilOrigin-Name: f31b3bd2a6a8aa35a6454f37f3a4b4595e2ad74256cd180439019ab4c6c2059e