/ File History
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of src/fkey.c

2019-11-01
18:52
Fix a harmless compiler warning. file: [92a248ec] check-in: [f0ebea35] user: drh branch: trunk, size: 58081
17:31
The SET DEFAULT and SET NULL conflict resolution actions for foreign key constraints should cause an error when they appear on a generated column. file: [89a72720] check-in: [b47513d2] user: drh branch: trunk, size: 58071
16:08
Add another missing column number translation to the foreign key logic. file: [171e5411] check-in: [32df5edc] user: drh branch: trunk, size: 57800
12:14
Add missing column translations to foreign key logic. Ticket [c28a01da72f8957c] file: [3c177def] check-in: [bc6a43e7] user: drh branch: trunk, size: 57713
2019-10-23
00:31
Fix the foreign key logic to be compatible with generated columns. file: [ac56f02f] check-in: [3de57145] user: drh branch: generated-columns, size: 57679
2019-10-09
17:06
An alternative, experimental lookaside memory allocator that uses two different slot sizes. file: [48921db2] check-in: [5ba8cee8] user: sperry branch: 2-size-lookaside, size: 57394
2019-10-05
14:39
Performance optimization to the lookaside-memory disabling mechanism. file: [6271fda5] check-in: [17ce1c49] user: drh branch: trunk, size: 57325
2019-08-13
15:22
Merge latest trunk changes with this branch. file: [2c14c943] check-in: [5b4689d8] user: dan branch: reuse-schema, size: 57344
2019-08-05
18:01
Refactor field Expr.affinity into Expr.affExpr to avoid confusion with other fields and variables named "affinity" and display affExpr it in sqlite3TreeViewExpr() output. file: [6b79f4c2] check-in: [a29f2a7d] user: drh branch: trunk, size: 57342
2019-07-26
20:54
Merge latest changes from trunk into this branch. file: [f4ef6f81] check-in: [7f1e4e4b] user: dan branch: reuse-schema, size: 57347
2019-07-16
19:44
Add new assert() statements in an attempt to help static analyzers avoid false-positives. file: [ab197190] check-in: [9e664585] user: drh branch: trunk, size: 57345
2019-05-14
22:25
Merge all the latest trunk enhancements into the reuse-schema branch. file: [4b54ea67] check-in: [018f3199] user: drh branch: reuse-schema, size: 57320
2019-04-19
13:38
Streamline the processing of the AND operator. Slightly smaller and faster. file: [0e14d4be] check-in: [7713996a] user: drh branch: trunk, size: 57318
2019-02-18
18:16
Ensure that creating temp schema items does not cause an OPEN_SHARABLE_SCHEMA connection to load all schemas into memory. file: [56ceea14] check-in: [88cbf54e] user: dan branch: reuse-schema, size: 57303
2019-02-12
19:20
Share schemas between databases attached to the same database handle. file: [878bec1b] check-in: [ea611d7c] user: dan branch: reuse-schema, size: 57300
2019-01-17
15:40
Revamp the SrcList allocator routines to be methods of Parse instead of being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. file: [bd0138ac] check-in: [df08d472] user: drh branch: trunk, size: 57298
2018-12-29
02:26
A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewer 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*. file: [aaf28be7] check-in: [4a0929ac] user: drh branch: trunk, size: 57290
2018-12-20
17:32
Fix a bug in the code that detects self-referencing rows as part of foreign key processing. Fix for [50d2a6c2]. file: [012dd7db] check-in: [16fff053] user: dan branch: trunk, size: 57285
2018-11-17
18:11
Fix further problems with the feature on this branch. file: [2c112c00] check-in: [6d7a7e5f] user: dan branch: reuse-schema1, size: 57133
2018-11-15
21:20
Fix some problems with the feature on this branch. Many problems remain. file: [029a6f10] check-in: [31b6aee7] user: dan branch: reuse-schema1, size: 57192
2018-09-20
19:02
Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new 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. file: [972a4ba1] check-in: [ad130bb8] user: drh branch: trunk, size: 57120
2018-09-19
20:14
Reduce the size of Expr to 64-bytes. This works somewhat, but there are test failures. More importantly, the size reduction from 80- to 64-bytes has not lowered the schema memory usage, but it has made the code a little bigger and a little slower. So the initial evidence is that this Expr refactoring experiment is not working... file: [234d4e9f] check-in: [24b0f66a] user: drh branch: expr-simplify, size: 57204
2018-07-22
00:45
Remove an unused branch in the FK logic. file: [f59253c0] check-in: [523ff779] user: drh branch: dropViewNoStat, size: 57118
2018-05-28
17:31
When compiling with SQLITE_DEBUG, add run-time checks to ensure that no statement aborts unless either there have been no writes or else there is a statement journal. file: [b1da9ef8] check-in: [5a4542db] user: drh branch: stmt-journal-testing, size: 57085
2017-11-14
23:48
In the parse tree, combine LIMIT and OFFSET into a single expression rooted on a TK_LIMIT node, for a small code size reduction and performance increase, and a reduction in code complexity. file: [d617daf6] check-in: [3925facd] user: drh branch: trunk, size: 56847
18:26
Fix the SQLITE_ENABLE_UPDATE_DELETE_LIMIT functionality so that it works with views and WITHOUT ROWID tables. This is a modified cherrypick of [dae4a97a]. file: [f19ee86f] check-in: [b2679d3b] user: dan branch: branch-3.8.9, size: 56129
2017-11-10
20:13
Omit some extra code from non-SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds. file: [821f70b6] check-in: [72be33f9] user: dan branch: update-delete-limit-fix, size: 56853
2017-06-22
16:51
When generating individual loops for each ORed term of an OR scan, move any constant WHERE expressions outside of the loop, as is done for top-level loops. file: [5ff2c895] check-in: [e4a022be] user: dan branch: or-optimization, size: 56844
2017-04-11
19:58
Avoid updating unaffected indexes on a table as part of an UPDATE that requires foreign key processing in some cases. file: [db65492a] check-in: [477bea9e] user: dan branch: fkey-optimization, size: 56805
2016-12-14
14:07
Refactor the Table.nRef field as Table.nTabRef for easier grepping. file: [2e9aabe1] check-in: [9cae4c2e] user: drh branch: trunk, size: 56287
2016-12-13
16:57
Fix a problem causing SQLite to return false "foreign key violation" errors 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. file: [4f527ddd] check-in: [850877d1] user: dan branch: trunk, size: 56284
2016-12-06
22:47
Performance improvement and size reduction in the Expr node allocator function sqlite3PExpr(). file: [4017dc6d] check-in: [2a81763e] user: drh branch: trunk, size: 56258
2016-09-23
20:59
Use sqlite3ExprAlloc() instead of sqlite3PExpr() for leaf nodes in the expression tree, where appropriate. This is both smaller and faster. file: [b9ca262f] check-in: [afac0709] user: drh branch: trunk, size: 56340
2016-08-18
14:33
Rename the Db.zName field to Db.zDbSName to make it more descriptive and to distinguish it from all of the other "zName" variables scattered throughout the code. file: [e2be0968] check-in: [92a22f01] user: drh branch: zDbSName, size: 56346
2016-06-03
18:21
Fix a memory leak when a WITHOUT ROWID eponymous virtual table is used. file: [bc414534] check-in: [31b83a7d] user: drh branch: without-rowid-vtab, size: 56343
2016-03-30
14:17
Remove a redundant test for disabling RESTRICT with defer_foreign_keys=ON. file: [4c0bd09e] check-in: [9cdf813c] user: drh branch: trunk, size: 56315
2016-03-04
16:42
Merge recent enhancements from trunk. Default page size is 4096. Writes to statement journals are avoided. file: [5da47ff5] check-in: [456df336] user: drh branch: sessions, size: 56396
2016-02-25
21:38
Small optimization in FK handling. file: [5cb42d9a] check-in: [e0d25913] user: mistachkin branch: trunk, size: 56316
19:52
Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set. file: [a842533c] check-in: [8fea1166] user: dan branch: sessions, size: 56315
2016-02-05
13:38
Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority cases where db is guaranteed to be not NULL. file: [08edad1f] check-in: [0a802e96] user: drh branch: oom-handling, size: 56235
01:55
Improvements to the way that OOM errors are processed. file: [dc893ee3] check-in: [c3ef0347] user: drh branch: oom-handling, size: 56233
2016-01-22
17:48
Add the sqlite3TokenInit() utility function. file: [c66d3e5b] check-in: [73231753] user: drh branch: trunk, size: 56368
2016-01-21
17:25
Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set. file: [3fd2e175] check-in: [82470d1c] user: dan branch: disable-restrict, size: 56490
2015-12-30
16:51
Changes to the way that the default BINARY collating sequence is recorded result in a slightly smaller and slightly faster executable. More work could be done to make this cleaner. file: [e18b3dff] check-in: [2081d757] user: drh branch: trunk, size: 56410
2015-09-29
17:20
Use symbolic names XN_ROWID and XN_EXPR in place of the (-1) and (-2) magic numbers in Index.aiColumn[]. Add asserts to help verify that Index.aiColumn[] is always used correctly. Fix one place in FK processing where Index.aiColumn[] was not being used correctly. file: [31900763] check-in: [7d272aa6] user: drh branch: trunk, size: 56427
2015-09-03
13:46
Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto() to just sqlite3VdbeGoto(). file: [83e1baba] check-in: [847387ec] user: drh branch: trunk, size: 56117
2015-09-02
18:19
Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for sqlite3VdbeAddOp2(v,OP_Goto,0,i). file: [a1d9d555] check-in: [be78f413] user: drh branch: trunk, size: 56123
2015-08-25
19:20
Use the sqlite3IndexColumnAffinity() routine to quickly and correctly find the affinity of an index column. file: [3ce33dd4] check-in: [1ee089a7] user: drh branch: trunk, size: 56145
2015-06-08
22:59
Code refactoring to try to shift FROM-clause subquery manifesting until after the query planner runs. Except this does not currently work because the query planner needs an estimated of the number of rows in the manifested table. Work in progress. file: [6c5a2dbf] check-in: [cabf2187] user: drh branch: view-optimization, size: 56139
2015-05-21
02:20
Ensure that tables names are dequoted exactly once by the trigger logic. Cherrypick [59e92bd9521f1e8] and [9d887b92f8086961e]. file: [46f9dc13] check-in: [9e3f64a4] user: drh branch: branch-3.7.11, size: 49494
2015-05-20
20:30
Ensure that tables names are dequoted exactly once by the trigger and FK logic. Cherrypick of [59e92bd9521f] and [9d887b92f808]. file: [5fadcfb5] check-in: [bd357739] user: dan branch: branch-3.8.6, size: 54447
2015-04-21
16:38
Ensure that tables names are dequoted exactly once by the trigger logic. file: [c9b63a21] check-in: [9d887b92] user: dan branch: trunk, size: 56136
03:13
Fix some identifier name de-quoting issues in the foreign key and trigger logic. file: [6040cf88] check-in: [59e92bd9] user: drh branch: trunk, size: 56170
2015-04-10
12:04
Fix foreign key CASCADE for cases where the parent key is an INTEGER PRIMARY KEY and the parent table contains other columns named "rowid", "_rowid_", and "oid". file: [3343d551] check-in: [ed3cbaab] user: drh branch: trunk, size: 56197
2014-12-17
14:38
Fix some comments in fkey.c. Add tests to fkey8.test. file: [e0444b61] check-in: [210cb2a6] user: dan branch: experimental-fk-actions, size: 56120
2014-12-16
20:13
Experimental opimizations to speed up FK constraint CASCADE and SET NULL action processing. Requires further testing. file: [eab56799] check-in: [35a20a5f] user: dan branch: experimental-fk-actions, size: 55464
2014-09-06
16:39
Fix typos in comments. No code changes. file: [da985ae6] check-in: [e62aab5e] user: peter.d.reid branch: trunk, size: 54435
2014-08-21
20:26
Simplify the interface to the symbol table, saving 600 bytes of code space. file: [8d81a780] check-in: [14b0f561] user: drh branch: trunk, size: 54437
2014-08-04
15:12
Changed my mind: This opcode name changes mere creates unnecessary diff marks between older and newer versions without significantly improving readability. Was: Rename the IsNull opcode to IfNull and rename the NotNull opcode to IfNotNull. file: [3a8804f7] check-in: [2f724cba] user: drh branch: deadend, size: 54508
2014-07-31
22:59
Refactoring: Change "pIndex->onError!=OE_None" to use a macro: "IsUniqueIndex(pIndex)". Easier to understand that way. file: [8545f3b3] check-in: [e75b26ee] user: drh branch: trunk, size: 54508
2014-05-27
18:18
Change the name of the Index.autoIndex field to Index.idxType and provide symbolic names for the various values of that field rather than using magic numbers. file: [a549cff9] check-in: [d16e575d] user: drh branch: trunk, size: 54511
2014-05-19
15:16
Changes to help ensure that a multiplication does not overflow when computing the number of bytes needed for a memory allocation, and cause a malfunction. No problems existing problems were discovered. However, these changes should help to ensure that no problems arise in the future. file: [abbf1c26] check-in: [17349a49] user: drh branch: safer-malloc, size: 54532
2014-02-19
14:20
Add the SQLITE_NOTNULL P5 code for comparison operations - really a composite of SQLITE_NULLEQ and SQLITE_JUMPIFNULL. This flag indicates that NULL operands are not possible and raises and assert() if NULL operands are seen. Also omit an unnecessary scan of the sqlite_sequence table when writing into an AUTOINCREMENT table. file: [5269ef07] check-in: [d2c047f3] user: drh branch: trunk, size: 54527
2014-02-17
22:40
Add logic to do test coverage measurements on the VDBE code. file: [3cd6ce99] check-in: [ce184c7b] user: drh branch: insert-optimization, size: 54479
14:59
Avoid unnecessary calls to applyAffinity() during INSERT and UPDATE operations, especially for table that have indices and tables for which all columns have affinity "NONE". file: [b3da26df] check-in: [35b4d6e9] user: drh branch: insert-optimization, size: 54272
2013-11-18
11:20
Fix harmless compiler warnings from clang scan-build. file: [2ab0f538] check-in: [8d002740] user: drh branch: trunk, size: 54290
2013-11-08
17:13
Fix harmless compiler warnings. file: [78364dae] check-in: [0077c077] user: drh branch: trunk, size: 54226
2013-11-06
19:59
Reference count the KeyInfo object. Cache a copy of an appropriate KeyInfo for each index in the Index object, and reuse that one copy as much as possible. file: [53708407] check-in: [defd5205] user: drh branch: omit-rowid, size: 54239
2013-11-05
13:33
Standardize the error messages generated by constraint failures to a format of "$TYPE constraint failed: $DETAIL". This involves many changes to the expected output of test cases. file: [c82c3aa5] check-in: [54b22192] user: drh branch: omit-rowid, size: 54318
2013-11-04
13:56
Correctly handle self-referential foreign keys on WITHOUT ROWID tables. file: [24bbd27a] check-in: [af128862] user: drh branch: omit-rowid, size: 54356
2013-11-03
02:27
Improved comments on foreign key logic. file: [df809cab] check-in: [1315d910] user: drh branch: omit-rowid, size: 52806
2013-11-02
22:09
Many new test cases added, that mostly work. Currently 18 errors in without_rowid3.test. Also there is a hack marked by a /*FIXME*/ comment on at fkey.c:547 that needs fixing. file: [8dc2b14d] check-in: [39e32187] user: drh branch: omit-rowid, size: 52690
2013-10-22
18:01
The Index object now has nKeyCol and nColumn. nColumn is the total number of columns and nKeyCol is the number of key columns. Currently these always differ by one. Refactor aiColumn[] to be of type i16 instead of int. file: [628f8117] check-in: [a106ce86] user: drh branch: omit-rowid, size: 52662
2013-10-12
15:12
Fix handling of "DROP TABLE" commands when "PRAGMA defer_foreign_keys=1" is set. file: [5dc10cba] check-in: [27001356] user: dan branch: trunk, size: 52662
2013-09-05
18:40
When preparing an UPDATE statement, avoid generating VDBE code for those foreign key related actions and constraint checks that may be seen to be unnecessary by considering the subset of table columns potentially modified by the UPDATE. file: [be866cd8] check-in: [e940b5de] user: dan branch: trunk, size: 52385
2013-07-11
12:19
Rename the SQLITE_DeferForeignKeys macro to shorter SQLITE_DeferFKs. Move the "defer_foreign_keys" pragma into the flagPragma() routine. file: [914a6bbd] check-in: [3a2ab74c] user: drh branch: sessions, size: 50000
2013-07-04
15:22
Fix a bug preventing some FK constraint checking from being deferred until the end of changeset application. file: [87619fc3] check-in: [1452defb] user: dan branch: sessions, size: 50016
2013-07-03
19:53
Experimental change to the handling of foreign key constraint violations when applying a changeset: all foreign keys, immediate and deferred, are deferred until the end of the transaction (or sub-transaction) opened by the sqlite3changeset_apply(). A single call to the conflict-handler (if any) is made if any FK constraint violations are still present in the database at this point. The conflict-handler may choose to rollback the changeset or to apply it, constraint violations and all. file: [ddd160ce] check-in: [1d44e5d3] user: dan branch: sessions, size: 49967
2013-02-09
13:58
Add extended error codes for constraint errors. file: [e16942bd] check-in: [54611046] user: drh branch: constraint-error-codes, size: 49903
2012-12-17
20:40
Enhance the error message for "foreign key mismatch" to include the names of the child and parent tables. Begin adding test cases for PRAGMA foreign_key_check. Make sure PRAGMA foreign_key_check gets all necessary table locks. file: [5b7a12e2] check-in: [0f996352] user: drh branch: foreign-key-check, size: 49817
16:46
Prototype for PRAGMA that checks all foreign key constraints on a table. file: [21fb5984] check-in: [01c980e9] user: drh branch: foreign-key-check, size: 49734
2012-12-08
03:34
Veryquick passes all tests now. file: [dcb7c37a] check-in: [7b96115e] user: drh branch: ticket-71e333e7, size: 49712
2012-12-07
18:38
Some errors in veryquick resolved. Many more to go. file: [ddf44f8c] check-in: [972443b4] user: drh branch: ticket-71e333e7, size: 49609
14:02
Veryquick now runs to completion without segfaulting or asserting. But there are still lots of errors. file: [0ef356ae] check-in: [7fafab12] user: drh branch: ticket-71e333e7, size: 49730
2012-12-06
21:16
Remove the Expr.pColl field and compute the collating sequence as it is needed. This fixes the test script "shared9.test", though there is still a memory leak. And there are other problems. Consider this a work-in-progress. file: [ca70996e] check-in: [fd011cb2] user: drh branch: ticket-71e333e7, size: 49614
2012-09-13
14:22
Change boolean fields in the Column object from unsigned characters into bits in a single bit mask variable. file: [c82a04e7] check-in: [4163f5f1] user: drh branch: trunk, size: 49602
2012-08-25
00:49
Backport check-in [62678be3df35cd]: When the same index is used for all OR-terms in a WHERE clause, then try to use that index as a covering index. file: [b792889e] check-in: [865dfcba] user: drh branch: branch-3.7.2, size: 48107
2012-08-24
18:44
Fix a problem to do with multi-or queries and automatic indexes. file: [9c77d842] check-in: [a3e26038] user: dan branch: multi-or-covering-index, size: 49558
2012-07-18
16:07
Remove another branch from the DbMalloc() paths. file: [7d1ec22d] check-in: [defd828e] user: dan branch: calloc, size: 49523
2011-10-25
20:36
Cherrypick changes [53f5cfe115] and [1f7ef0af8d] in order to fix an issue with DISTINCT file: [ca7cdb31] check-in: [14bc58ca] user: drh branch: branch-3.7.2, size: 48104
2011-10-14
21:49
Add assert() statements and eliminate needless variable assignments in order to get the clang scan-build utility to report zero problems against the SQLite core. Clang's static analysis did find one real problem - but it was in the command-line shell, not in the SQLite core. file: [65721246] check-in: [60fee957] user: drh branch: trunk, size: 49555
2011-08-22
20:33
Remove an unreachable branch in the FK code. file: [9f00ea98] check-in: [6c227cc8] user: drh branch: trunk, size: 49531
09:54
Fix for [b1d3a2e531]. file: [c92c8eec] check-in: [3f3acee4] user: dan branch: trunk, size: 49549
2011-07-02
13:34
Cherrypick [45e581bff7] into the 3.7.2 branch. file: [d56da9f6] check-in: [c593792c] user: dan branch: branch-3.7.2, size: 48105
2011-06-30
20:17
Experimental changes to improve optimization of DISTINCT queries. file: [c8492fed] check-in: [f7ba0219] user: dan branch: experimental, size: 48645
2011-06-10
16:33
Fix minor problems with foreign key constraints where the parent table is the same as the child table. file: [9fabba17] check-in: [442d8d8b] user: dan branch: trunk, size: 48642
2011-04-05
13:12
Merge the scheme-parse-refactor changes into trunk: (1) added sqlite3SchemaMutexHeld() asserts, (2) Use -1 instead of 0 to mean "all" in sqlite3ResetInternalSchema(), and other cosmetic changes. file: [a43ba8a0] check-in: [5db4511d] user: drh branch: trunk, size: 48088
12:25
Fix the P4_TRANSIENT constant so that it works correct - so that it really makes a copy of the string for the P4 argument. Use P4_TRANSIENT wherever appropriate. Change P4_STATICs of schema names to P4_TRANSIENT. file: [8ab7ace4] check-in: [bf664b20] user: drh branch: trunk, size: 48021
2011-04-04
18:22
Add a description of access rules for the Schema object and lots of asserts to verify that the access rules are followed. file: [387c9b45] check-in: [ae8374af] user: drh branch: schema-parse-refactor, size: 48078
2011-03-06
21:28
Remove dead code identified by the clang static analyzer. file: [418b8400] check-in: [01a79d5a] user: drh branch: trunk, size: 48011
2010-09-28
00:25
Continuing work toward detecting and fixing shallow-copy misuse. file: [17950a28] check-in: [d0342f4b] user: drh branch: bug-b351d95f9c, size: 48101
2010-07-29
01:50
Correct handling of compound foreign key constraints that include the integer primary key as one of the columns. Ticket [ce7c133ea6cc9ccdc1] file: [58bbf52c] check-in: [53902f7d] user: drh branch: trunk, size: 48102
2010-07-24
11:28
Experimental code to measure memory consumed by database schemas and prepared statements. file: [cacfe3e2] check-in: [9aa30342] user: dan branch: experimental, size: 48067
2010-07-23
17:06
Remove additional traces (mostly in comments) of the Table.dbMem field. file: [62eed881] check-in: [5c58f44a] user: drh branch: trunk, size: 48012
15:41
Remove the Table.dbMem variable, as it is no longer being used for its original purpose. file: [31b8dc8e] check-in: [6eddc6e6] user: dan branch: trunk, size: 48224
2009-11-12
19:59
Enhance the OP_Found and OP_NotFound opcodes so that they can accept an array of registers as an unpacked record in addition to a record built using OP_MakeRecord. Use this to avoid OP_MakeRecord calls during IN expression processing. file: [e2116672] check-in: [b9eab885] user: drh branch: trunk, size: 48238
2009-10-13
13:08
Suppress some harmless compiler warnings. file: [41219cba] check-in: [5d381daa] user: drh branch: trunk, size: 48232
2009-10-12
22:30
Add asserts as evidence that all FK constraints are either immediate or deferred. file: [34ee2b0d] check-in: [634ef4fc] user: drh branch: trunk, size: 48221
20:01
When processing FK constraints on changes to parent tables, make sure the names of child tables appear correctly in the output of EXPLAIN QUERY PLAN. file: [2b79b385] check-in: [a4ab5215] user: drh branch: trunk, size: 48096
2009-10-07
16:04
Add a missing OP_Close opcode to VDBE programs that check for FK constraint violations. file: [6d27707f] check-in: [5caa4a2b] user: dan branch: trunk, size: 47995
2009-10-03
07:04
Handle an SQLITE_IGNORE returned when requesting authorization to read parent key columns by pretending the parent key columns contain NULL values. file: [720f049d] check-in: [3c24df38] user: dan branch: trunk, size: 47955
2009-10-02
14:23
When inserting a row into a child table, invoke the authorization callback to request permission to read the parent key columns. file: [bcc2af88] check-in: [9842f2d5] user: dan branch: trunk, size: 47490
2009-10-01
16:09
If an update does not modify any child or parent key columns, omit foreign key processing for the statement. file: [b20074e0] check-in: [edff3500] user: dan branch: trunk, size: 47216
2009-09-30
08:11
Remove unreachable branches from fkey.c. Add a few tests to cover the remaining branches. file: [8b438b1f] check-in: [0a0a17d8] user: dan branch: trunk, size: 46423
2009-09-29
16:38
Use the affinity and collation sequence associated with the parent key when finding child table rows to apply a foreign key action to. file: [e1128e8d] check-in: [9a4b7ec2] user: dan branch: trunk, size: 46663
15:41
Check that a unique index uses the default collation sequences for each column before using it as part of a foreign key constraint operation. file: [aed9dc4c] check-in: [64154174] user: dan branch: trunk, size: 46453
11:28
Remove an unused variable from fkey.c. file: [93b4f9a9] check-in: [582bd768] user: dan branch: trunk, size: 45756
2009-09-28
18:52
Ignore foreign key mismatch errors while compiling DROP TABLE commands. file: [e31715c1] check-in: [5b4d4637] user: dan branch: trunk, size: 46033
14:49
Fix the DROP TABLE command so that it cannot be used to bypass foreign key constraints (if foreign key support is enabled). file: [8c5deb17] check-in: [8353808c] user: dan branch: trunk, size: 45687
11:54
Fix some foreign key constraint related problems that occur when a row refers to itself. file: [5bbe13f5] check-in: [9e503e2d] user: dan branch: trunk, size: 43372
2009-09-26
17:51
When ALTER TABLE RENAME TO is used to change the name of a table that is the parent table of a foreign key constraint, modify that foreign key constraint to use the new table name. file: [ee4e0d24] check-in: [b4a10c39] user: dan branch: trunk, size: 41490
2009-09-25
17:03
Avoid checking if an insert or delete has "fixed" an outstanding FK constraint violation if the constraint counter indicates that the database contains no such violations. file: [542de974] check-in: [519144ac] user: dan branch: trunk, size: 41452
12:00
Fix comments in fkey2.c to reflect the immediate-constraint-counter approach. file: [8719d0fa] check-in: [9fd54b0a] user: dan branch: trunk, size: 40886
2009-09-24
18:19
Fixes and test cases to make sure the affinity and collation sequence associated with the parent key is used when comparing it with a child key value. file: [5ec139b6] check-in: [76e8e74b] user: dan branch: trunk, size: 39637
15:16
Fix a problem in fkey.c when a child key is the IPK of its table. file: [d5610f84] check-in: [8a000a8a] user: dan branch: trunk, size: 38786
14:27
Remove the ALWAYS() added by the previous check-in. It is not needed. file: [ba7fa13d] check-in: [36568963] user: drh branch: trunk, size: 38798
13:48
Comment enhancements. Add an ALWAYS macro in fkey.c to indicate a branch that is always taken. file: [3a5f73fd] check-in: [d5b714cf] user: drh branch: trunk, size: 38840
2009-09-23
18:07
Fix a problem with FK constraints that implicitly map to a composite primary key. file: [a1c293cc] check-in: [e0a48d53] user: dan branch: trunk, size: 38759
17:30
Do not check immediate foreign key constraints until the end of the statement. This matches the postgres behaviour. file: [89232758] check-in: [1a32149c] user: dan branch: trunk, size: 38855
13:59
Disallow using the implicit rowid column as the parent key of an FK constraint. file: [9a0afe07] check-in: [a5f7e71f] user: dan branch: trunk, size: 38791
12:06
Add extra tests for foreign key support. file: [320b318d] check-in: [7d086afe] user: dan branch: trunk, size: 38923
08:43
Add missing comments to fkey.c. Also, change the terminology used for comments and names in fkey.c from "referenced/referencing" to "parent/child". This is arguably less correct, but is easier to follow. file: [da1a63c1] check-in: [540c2d18] user: dan branch: trunk, size: 38951
03:01
Do not run ON UPDATE actions of a foreign key constraint unless at least one column value really does change. file: [de296942] check-in: [71ac8e28] user: drh branch: trunk, size: 31648
2009-09-22
16:55
Fix another OOM related problem in fkey.c. file: [fa1ad144] check-in: [e2bc51bc] user: dan branch: trunk, size: 30668
16:08
Fix a problem with ON DELETE SET DEFAULT actions. file: [db2225a0] check-in: [94069950] user: dan branch: trunk, size: 30564
15:53
Fix an OOM related crash in fkey.c. file: [2c20574e] check-in: [635d6a77] user: dan branch: trunk, size: 30576
2009-09-21
18:56
Fix a problem with foreign key constraints that map from and IPK column. file: [6aad270a] check-in: [84129052] user: dan branch: trunk, size: 29691
16:06
Fix compilation with OMIT_TRIGGER defined. Ticket [1ff6d29030]. file: [0f06ecda] check-in: [fb6ceed3] user: dan branch: trunk, size: 29442
2009-09-19
17:00
Check in implementation of foreign key constraints. file: [77a358c5] check-in: [d5d39981] user: dan branch: trunk, size: 29302 Added