aboutsummaryrefslogtreecommitdiff
path: root/src/fkey.c
Commit message (Collapse)AuthorAge
* Tighter checking of access constraints on union members in SrcItem.drh2024-08-20
| | | | | Improved invariant checking. FossilOrigin-Name: fd72d3400a8fe5747f494eee81654698acee350bb95b9db269e87d857af03492
* 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
* Reduce the size of the SrcItem object by combining fields into a union.drh2024-08-17
| | | FossilOrigin-Name: a4c59ac3c6ec979c25b544d29e47b8e39f6439c098eed8f84b3bd506c9adf047
* Allow arbitrary expressions as the second argument to RAISE().drh2024-05-08
| | | FossilOrigin-Name: 003e1c8c27824cb917b3869bdf9000f32ff0b6887a2aff8516712cfe865cf34d
* Remove a branch that cannot affect the outcome from FkNoAction processing indrh2023-10-21
| | | | | fkey.c. Replace it with an assert(). FossilOrigin-Name: 023a9dbe83c0042e9d500e3ae6c0592a468982e4ac278d08c9201967506c7555
* Add the SQLITE_CHANGESETAPPLY_FKNOACTION flag to sqlite3session.h, for ↵dan2023-10-20
| | | | | passing to sqlite3changeset_apply_v2() to cause all foreign key constraints to behave as if they were declared NO ACTION. FossilOrigin-Name: fc9f82ea084159eaf3dd1757b96d17d1201b00c4e06455a7dcd8067172b25f28
* Address various harmless compiler warnings fromdrh2023-06-16
| | | | | [forum:/forumpost/d526da8ee4|forum post d526da8ee4]. FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
* Avoid double de-quoting of table names when processing RESTRICT actionsdrh2023-04-14
| | | | | | in foreign key constraints. [https://bugs.chromium.org/p/chromium/issues/detail?id=1405220|Chromium 1405220]. FossilOrigin-Name: bb2b5ab172f0751c00343facf36fb12db10c88220caece31849f2711f12293d9
* 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
* Fix a problem with "ON DELETE RESTRICT" and "ON UPDATE RESTRICT" foreign ↵dan2022-04-16
| | | | | keys in attached databases scanning child tables in the wrong schema. FossilOrigin-Name: 04d5b637f087520cd58211505f9b5c086ff96d864a1908f60464b6fe22c62b7d
* Use unpacked keys for OP_Found in foreign key processing.drh2022-04-04
| | | FossilOrigin-Name: 328dc76657eb5317f0201859d2b3abe6918103b894f7beaed0aca3058a9f2b64
* Give the virtual table xBestIndex method access to (some) OFFSET and LIMITdrh2022-01-27
| | | | | clauses. FossilOrigin-Name: 74fa5757ee0a8499bcd6546dac1a3ecc6048ba9cff9e3e574e28e6e82e894a3d
* Clear the cache of triggers used to implement CASCADE foreign key constraintsdrh2022-01-02
| | | | | | whenever the schema changes. Fix for the problem identified by [forum:/forumpost/2831335356|forum post 2831335356]. FossilOrigin-Name: 5232c9777fe4fb13e1ecfe5b5d644e2c45d0514f95884dbed49a03fb9b67304c
* Protect access to the Expr.y union using nearby assert()s and branches.drh2021-10-07
| | | FossilOrigin-Name: 87e2f5eb436fc448427b0e24fb70f29688796b513b8c7b12f1a21540dae1e56d
* Protect every access to the Table.u union using a nearby assert() or branch.drh2021-10-07
| | | FossilOrigin-Name: 50e08338aed7ac0cee600098d2ecd4b3b7bfd31a597bb26773badf3d2e2582c8
* 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
* Improved harmony with the reuse-schema branch.drh2021-08-03
| | | FossilOrigin-Name: cbc703f70d16de0e93b276528fc761290f30af770ceb4b4d11d6a6e6506ac67c
* 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
* 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 doing any foreign-key constraint related processing for an UPDATE ↵dan2021-02-03
| | | | | statement that does not modify any columns that are part of FK constraints, even if the table has a self-referencing FK. FossilOrigin-Name: 7f3b036e730153ac22933b03a52d4ec3978c9ecab1399d8cc79fe533893321e3
* Allow "*" wildcards in the RETURNING clause.drh2021-01-29
| | | FossilOrigin-Name: b0e3ae303db2a035583a05848ab7977e612d7e40c77e31ea9e0166de443c901f
* Working prototype.drh2021-01-29
| | | FossilOrigin-Name: b7ef4dc21f187ff4ff679e823782535188c3814aa6ce720b3a01c6d3ba4ef9f5
* Fix harmless compiler warnings that surface in newer versions of GCC.drh2020-08-10
| | | FossilOrigin-Name: 9d670a318381f219b467653f5f9539097808b887ae37291ce13be462dedfb18d
* During byte-code generation, strive to avoid jumps that merely jump to thedrh2020-02-07
| | | | | following instruction. FossilOrigin-Name: bcf876e67e75f6709f2b25683a3952bbbb87c672bb9d7af456feebc0ab9f6c31
* Fix a harmless compiler warning.drh2019-11-01
| | | FossilOrigin-Name: f0ebea35d9d6b69a7bb4242fb79ff3db4267e429855fa6969f9f52ffee1c7a99
* The SET DEFAULT and SET NULL conflict resolution actions for foreign keydrh2019-11-01
| | | | | constraints should cause an error when they appear on a generated column. FossilOrigin-Name: b47513d2b32b61ba42c1e9b59287d28f6fee231e6c65de2a3aa19effbbaf1e7f
* Add another missing column number translation to the foreign key logic.drh2019-11-01
| | | FossilOrigin-Name: 32df5edcfef2605009f45d6ef1b97c63a99df07c7b4e00dc70f93001cfb8d81f
* Add missing column translations to foreign key logic.drh2019-11-01
| | | | | Ticket [c28a01da72f8957c] FossilOrigin-Name: bc6a43e7ee6353b9ef3dea4309c77e170a1c798eefcfaa7636bf5a93e51c47ee
* Fix the foreign key logic to be compatible with generated columns.drh2019-10-23
| | | FossilOrigin-Name: 3de57145a18c62ff9b556c7218d8b276000d0052e4890212fa9335235f22d03c
* Performance optimization to the lookaside-memory disabling mechanism.drh2019-10-05
| | | FossilOrigin-Name: 17ce1c49cb0ed6fdd8c7c33431bc2afa217f1092c99b8dd608890a8e7aec7fb1
* Refactor field Expr.affinity into Expr.affExpr to avoid confusion with otherdrh2019-08-05
| | | | | | fields and variables named "affinity" and display affExpr it in sqlite3TreeViewExpr() output. FossilOrigin-Name: a29f2a7d07beff64e489e8f824babc6228c4a499fadc0ee701caa60a63baadcd
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* Streamline the processing of the AND operator. Slightly smaller and faster.drh2019-04-19
| | | FossilOrigin-Name: 7713996aa99ce6dd35b5a2db74dd26658fb8d9817169b2a7531cdef6edb41403
* Revamp the SrcList allocator routines to be methods of Parse instead ofdrh2019-01-17
| | | | | | being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. FossilOrigin-Name: df08d472b090b212fb77ce2aae0e1ffe79ae5db4b1accf55e6fdb18e8b0a7098
* A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewerdrh2018-12-29
| | | | | | | | | memory allocations by deferring memory allocation until sqlite3VdbeResolveLabel() is called, at which point the code generator has a better idea of how big the relocation table needs to be. The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of Vdbe*. FossilOrigin-Name: 4a0929ac76d8aa5dd65eac3b83d6bbf41e505e01d175ca0fb2b19ba02d439415
* Fix a bug in the code that detects self-referencing rows as part of foreigndan2018-12-20
| | | | | key processing. Fix for [50d2a6c2]. FossilOrigin-Name: 16fff05347f42fe9fa0f3150290b98b59a9bb921e49dc07ca397aa1de7a7e17d
* Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a newdrh2018-09-20
| | | | | | | EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer. This reduces the size of the Expr object by 8 bytes, reduces the overall amount of code, and shaves over 1 million cycles off of the speed test. FossilOrigin-Name: ad130bb86e74e6ce165fdbdce3a19699510f0e62071c1c7923b5a4538d888c7c
* Remove an unused branch in the FK logic.drh2018-07-22
| | | FossilOrigin-Name: 523ff77925f1da361cf31e3fc82bcb1708ed356a2391430ab14ef620c9bf2327
* When compiling with SQLITE_DEBUG, add run-time checks to ensure that nodrh2018-05-28
| | | | | | statement aborts unless either there have been no writes or else there is a statement journal. FossilOrigin-Name: 5a4542dbcf17a9f7fed600897555c271e1651fd50eb41d0b126725b486e1d14c
* In the parse tree, combine LIMIT and OFFSET into a single expression rooteddrh2017-11-14
| | | | | | on a TK_LIMIT node, for a small code size reduction and performance increase, and a reduction in code complexity. FossilOrigin-Name: 3925facd942c9df663f9b29b1e6f94f6be14af8c2b99eb691bfc836b4c220826
* Omit some extra code from non-SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds.dan2017-11-10
| | | FossilOrigin-Name: 72be33f9c84de3ec4afc40549482417456ca82c1d16b473dc034b144055271e5
* When generating individual loops for each ORed term of an OR scan, move anydan2017-06-22
| | | | | | constant WHERE expressions outside of the loop, as is done for top-level loops. FossilOrigin-Name: e4a022be4b069b08cfdfda5295461676b99d28e17bbbedfbcb362dec69de59bd
* Avoid updating unaffected indexes on a table as part of an UPDATE that requiresdan2017-04-11
| | | | | foreign key processing in some cases. FossilOrigin-Name: 477bea9ed0dd0fa69896bfd16d9b1d22170cbab784e3279ce65c29c47e032f34
* Refactor the Table.nRef field as Table.nTabRef for easier grepping.drh2016-12-14
| | | FossilOrigin-Name: 9cae4c2e300e20304ced0dc8c1415c4922185928
* Fix a problem causing SQLite to return false "foreign key violation" errorsdan2016-12-13
| | | | | | | when there is a partial (i.e. WHERE constrained) UNIQUE index on the parent key columns. This bug did not cause SQLite to allow illegal data to be inserted into the database, only to reject legal operations. FossilOrigin-Name: 850877d1ea43104cc215353414b870c340acced2
* Performance improvement and size reduction in the Expr node allocatordrh2016-12-06
| | | | | function sqlite3PExpr(). FossilOrigin-Name: 2a81763e68cdf9b8c46389b1e1a87bc2084b53e7
* Use sqlite3ExprAlloc() instead of sqlite3PExpr() for leaf nodes in thedrh2016-09-23
| | | | | expression tree, where appropriate. This is both smaller and faster. FossilOrigin-Name: afac0709cec577a7851e3711730712cf12eeb6af
* Rename the Db.zName field to Db.zDbSName to make it more descriptive and todrh2016-08-18
| | | | | | distinguish it from all of the other "zName" variables scattered throughout the code. FossilOrigin-Name: 92a22f01343a898455fd61c3b8e7d7c954f5b569