/ All files named "src/fkey.c"
Login

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

History for src/fkey.c

2020-08-11
14:55
[6cf1e15c] part of check-in [b1a77b7e] Merge all changes since the 3.32.0 release into the reuse-schema branch. (check-in: [b1a77b7e] user: drh branch: reuse-schema, size: 58139)
2020-08-10
14:18
[83372403] part of check-in [9d670a31] Fix harmless compiler warnings that surface in newer versions of GCC. (check-in: [9d670a31] user: drh branch: trunk, size: 58137)
2020-02-27
15:20
[784662bc] part of check-in [3f5650aa] Merge latest trunk changes into this branch. (check-in: [3f5650aa] user: dan branch: reuse-schema, size: 58092)
2020-02-07
19:44
[4b575423] part of check-in [bcf876e6] During byte-code generation, strive to avoid jumps that merely jump to the following instruction. (check-in: [bcf876e6] user: drh branch: trunk, size: 58090)
2020-01-15
14:26
[2d234423] part of check-in [f7839178] Merge all recent enhancements and fixes from trunk. (check-in: [f7839178] user: drh branch: reuse-schema, size: 58083)
2019-11-01
18:52
[92a248ec] part of check-in [f0ebea35] Fix a harmless compiler warning. (check-in: [f0ebea35] user: drh branch: trunk, size: 58081)
17:31
[89a72720] part of check-in [b47513d2] The SET DEFAULT and SET NULL conflict resolution actions for foreign key constraints should cause an error when they appear on a generated column. (check-in: [b47513d2] user: drh branch: trunk, size: 58071)
16:08
[171e5411] part of check-in [32df5edc] Add another missing column number translation to the foreign key logic. (check-in: [32df5edc] user: drh branch: trunk, size: 57800)
12:14
[3c177def] part of check-in [bc6a43e7] Add missing column translations to foreign key logic. Ticket [c28a01da72f8957c] (check-in: [bc6a43e7] user: drh branch: trunk, size: 57713)
2019-10-23
00:31
[ac56f02f] part of check-in [3de57145] Fix the foreign key logic to be compatible with generated columns. (check-in: [3de57145] user: drh branch: generated-columns, size: 57679)
2019-10-09
17:06
[48921db2] part of check-in [5ba8cee8] An alternative, experimental lookaside memory allocator that uses two different slot sizes. (check-in: [5ba8cee8] user: sperry branch: 2-size-lookaside, size: 57394)
2019-10-05
14:39
[6271fda5] part of check-in [17ce1c49] Performance optimization to the lookaside-memory disabling mechanism. (check-in: [17ce1c49] user: drh branch: trunk, size: 57325)
2019-08-13
15:22
[2c14c943] part of check-in [5b4689d8] Merge latest trunk changes with this branch. (check-in: [5b4689d8] user: dan branch: reuse-schema, size: 57344)
2019-08-05
18:01
[6b79f4c2] part of check-in [a29f2a7d] Refactor field Expr.affinity into Expr.affExpr to avoid confusion with other fields and variables named "affinity" and display affExpr it in sqlite3TreeViewExpr() output. (check-in: [a29f2a7d] user: drh branch: trunk, size: 57342)
2019-07-26
20:54
[f4ef6f81] part of check-in [7f1e4e4b] Merge latest changes from trunk into this branch. (check-in: [7f1e4e4b] user: dan branch: reuse-schema, size: 57347)
2019-07-16
19:44
[ab197190] part of check-in [9e664585] Add new assert() statements in an attempt to help static analyzers avoid false-positives. (check-in: [9e664585] user: drh branch: trunk, size: 57345)
2019-05-14
22:25
[4b54ea67] part of check-in [018f3199] Merge all the latest trunk enhancements into the reuse-schema branch. (check-in: [018f3199] user: drh branch: reuse-schema, size: 57320)
2019-04-19
13:38
[0e14d4be] part of check-in [7713996a] Streamline the processing of the AND operator. Slightly smaller and faster. (check-in: [7713996a] user: drh branch: trunk, size: 57318)
2019-02-18
18:16
[56ceea14] part of check-in [88cbf54e] Ensure that creating temp schema items does not cause an OPEN_SHARABLE_SCHEMA connection to load all schemas into memory. (check-in: [88cbf54e] user: dan branch: reuse-schema, size: 57303)
2019-02-12
19:20
[878bec1b] part of check-in [ea611d7c] Share schemas between databases attached to the same database handle. (check-in: [ea611d7c] user: dan branch: reuse-schema, size: 57300)
2019-01-17
15:40
[bd0138ac] part of check-in [df08d472] 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. (check-in: [df08d472] user: drh branch: trunk, size: 57298)
2018-12-29
02:26
[aaf28be7] part of check-in [4a0929ac] 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*. (check-in: [4a0929ac] user: drh branch: trunk, size: 57290)
2018-12-20
17:32
[012dd7db] part of check-in [16fff053] Fix a bug in the code that detects self-referencing rows as part of foreign key processing. Fix for [50d2a6c2]. (check-in: [16fff053] user: dan branch: trunk, size: 57285)
2018-11-17
18:11
[2c112c00] part of check-in [6d7a7e5f] Fix further problems with the feature on this branch. (check-in: [6d7a7e5f] user: dan branch: reuse-schema1, size: 57133)
2018-11-15
21:20
[029a6f10] part of check-in [31b6aee7] Fix some problems with the feature on this branch. Many problems remain. (check-in: [31b6aee7] user: dan branch: reuse-schema1, size: 57192)
2018-09-20
19:02
[972a4ba1] part of check-in [ad130bb8] 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. (check-in: [ad130bb8] user: drh branch: trunk, size: 57120)
2018-09-19
20:14
[234d4e9f] part of check-in [24b0f66a] 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... (check-in: [24b0f66a] user: drh branch: expr-simplify, size: 57204)
2018-07-22
00:45
[f59253c0] part of check-in [523ff779] Remove an unused branch in the FK logic. (check-in: [523ff779] user: drh branch: dropViewNoStat, size: 57118)
2018-05-28
17:31
[b1da9ef8] part of check-in [5a4542db] 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. (check-in: [5a4542db] user: drh branch: stmt-journal-testing, size: 57085)
2017-11-14
23:48
[d617daf6] part of check-in [3925facd] 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. (check-in: [3925facd] user: drh branch: trunk, size: 56847)
18:26
[f19ee86f] part of check-in [b2679d3b] 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]. (check-in: [b2679d3b] user: dan branch: branch-3.8.9, size: 56129)
2017-11-10
20:13
[821f70b6] part of check-in [72be33f9] Omit some extra code from non-SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds. (check-in: [72be33f9] user: dan branch: update-delete-limit-fix, size: 56853)
2017-06-22
16:51
[5ff2c895] part of check-in [e4a022be] 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. (check-in: [e4a022be] user: dan branch: or-optimization, size: 56844)
2017-04-11
19:58
[db65492a] part of check-in [477bea9e] Avoid updating unaffected indexes on a table as part of an UPDATE that requires foreign key processing in some cases. (check-in: [477bea9e] user: dan branch: fkey-optimization, size: 56805)
2016-12-14
14:07
[2e9aabe1] part of check-in [9cae4c2e] Refactor the Table.nRef field as Table.nTabRef for easier grepping. (check-in: [9cae4c2e] user: drh branch: trunk, size: 56287)
2016-12-13
16:57
[4f527ddd] part of check-in [850877d1] 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. (check-in: [850877d1] user: dan branch: trunk, size: 56284)
2016-12-06
22:47
[4017dc6d] part of check-in [2a81763e] Performance improvement and size reduction in the Expr node allocator function sqlite3PExpr(). (check-in: [2a81763e] user: drh branch: trunk, size: 56258)
2016-09-23
20:59
[b9ca262f] part of check-in [afac0709] Use sqlite3ExprAlloc() instead of sqlite3PExpr() for leaf nodes in the expression tree, where appropriate. This is both smaller and faster. (check-in: [afac0709] user: drh branch: trunk, size: 56340)
2016-08-18
14:33
[e2be0968] part of check-in [92a22f01] 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. (check-in: [92a22f01] user: drh branch: zDbSName, size: 56346)
2016-06-03
18:21
[bc414534] part of check-in [31b83a7d] Fix a memory leak when a WITHOUT ROWID eponymous virtual table is used. (check-in: [31b83a7d] user: drh branch: without-rowid-vtab, size: 56343)
2016-03-30
14:17
[4c0bd09e] part of check-in [9cdf813c] Remove a redundant test for disabling RESTRICT with defer_foreign_keys=ON. (check-in: [9cdf813c] user: drh branch: trunk, size: 56315)
2016-03-04
16:42
[5da47ff5] part of check-in [456df336] Merge recent enhancements from trunk. Default page size is 4096. Writes to statement journals are avoided. (check-in: [456df336] user: drh branch: sessions, size: 56396)
2016-02-25
21:38
[5cb42d9a] part of check-in [e0d25913] Small optimization in FK handling. (check-in: [e0d25913] user: mistachkin branch: trunk, size: 56316)
19:52
[a842533c] part of check-in [8fea1166] Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set. (check-in: [8fea1166] user: dan branch: sessions, size: 56315)
2016-02-05
13:38
[08edad1f] part of check-in [0a802e96] Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority cases where db is guaranteed to be not NULL. (check-in: [0a802e96] user: drh branch: oom-handling, size: 56235)
01:55
[dc893ee3] part of check-in [c3ef0347] Improvements to the way that OOM errors are processed. (check-in: [c3ef0347] user: drh branch: oom-handling, size: 56233)
2016-01-22
17:48
[c66d3e5b] part of check-in [73231753] Add the sqlite3TokenInit() utility function. (check-in: [73231753] user: drh branch: trunk, size: 56368)
2016-01-21
17:25
[3fd2e175] part of check-in [82470d1c] Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set. (check-in: [82470d1c] user: dan branch: disable-restrict, size: 56490)
2015-12-30
16:51
[e18b3dff] part of check-in [2081d757] 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. (check-in: [2081d757] user: drh branch: trunk, size: 56410)
2015-09-29
17:20
[31900763] part of check-in [7d272aa6] 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. (check-in: [7d272aa6] user: drh branch: trunk, size: 56427)
2015-09-03
13:46
[83e1baba] part of check-in [847387ec] Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto() to just sqlite3VdbeGoto(). (check-in: [847387ec] user: drh branch: trunk, size: 56117)
2015-09-02
18:19
[a1d9d555] part of check-in [be78f413] Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for sqlite3VdbeAddOp2(v,OP_Goto,0,i). (check-in: [be78f413] user: drh branch: trunk, size: 56123)
2015-08-25
19:20
[3ce33dd4] part of check-in [1ee089a7] Use the sqlite3IndexColumnAffinity() routine to quickly and correctly find the affinity of an index column. (check-in: [1ee089a7] user: drh branch: trunk, size: 56145)
2015-06-08
22:59
[6c5a2dbf] part of check-in [cabf2187] 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. (check-in: [cabf2187] user: drh branch: view-optimization, size: 56139)
2015-05-21
02:20
[46f9dc13] part of check-in [9e3f64a4] Ensure that tables names are dequoted exactly once by the trigger logic. Cherrypick [59e92bd9521f1e8] and [9d887b92f8086961e]. (check-in: [9e3f64a4] user: drh branch: branch-3.7.11, size: 49494)
2015-05-20
20:30
[5fadcfb5] part of check-in [bd357739] Ensure that tables names are dequoted exactly once by the trigger and FK logic. Cherrypick of [59e92bd9521f] and [9d887b92f808]. (check-in: [bd357739] user: dan branch: branch-3.8.6, size: 54447)
2015-04-21
16:38
[c9b63a21] part of check-in [9d887b92] Ensure that tables names are dequoted exactly once by the trigger logic. (check-in: [9d887b92] user: dan branch: trunk, size: 56136)
03:13
[6040cf88] part of check-in [59e92bd9] Fix some identifier name de-quoting issues in the foreign key and trigger logic. (check-in: [59e92bd9] user: drh branch: trunk, size: 56170)
2015-04-10
12:04
[3343d551] part of check-in [ed3cbaab] 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". (check-in: [ed3cbaab] user: drh branch: trunk, size: 56197)
2014-12-17
14:38
[e0444b61] part of check-in [210cb2a6] Fix some comments in fkey.c. Add tests to fkey8.test. (check-in: [210cb2a6] user: dan branch: experimental-fk-actions, size: 56120)
2014-12-16
20:13
[eab56799] part of check-in [35a20a5f] Experimental opimizations to speed up FK constraint CASCADE and SET NULL action processing. Requires further testing. (check-in: [35a20a5f] user: dan branch: experimental-fk-actions, size: 55464)
2014-09-06
16:39
[da985ae6] part of check-in [e62aab5e] Fix typos in comments. No code changes. (check-in: [e62aab5e] user: peter.d.reid branch: trunk, size: 54435)
2014-08-21
20:26
[8d81a780] part of check-in [14b0f561] Simplify the interface to the symbol table, saving 600 bytes of code space. (check-in: [14b0f561] user: drh branch: trunk, size: 54437)
2014-08-04
15:12
[3a8804f7] part of check-in [2f724cba] 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. (check-in: [2f724cba] user: drh branch: deadend, size: 54508)
2014-07-31
22:59
[8545f3b3] part of check-in [e75b26ee] Refactoring: Change "pIndex->onError!=OE_None" to use a macro: "IsUniqueIndex(pIndex)". Easier to understand that way. (check-in: [e75b26ee] user: drh branch: trunk, size: 54508)
2014-05-27
18:18
[a549cff9] part of check-in [d16e575d] 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. (check-in: [d16e575d] user: drh branch: trunk, size: 54511)
2014-05-19
15:16
[abbf1c26] part of check-in [17349a49] 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. (check-in: [17349a49] user: drh branch: safer-malloc, size: 54532)
2014-02-19
14:20
[5269ef07] part of check-in [d2c047f3] 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. (check-in: [d2c047f3] user: drh branch: trunk, size: 54527)
2014-02-17
22:40
[3cd6ce99] part of check-in [ce184c7b] Add logic to do test coverage measurements on the VDBE code. (check-in: [ce184c7b] user: drh branch: insert-optimization, size: 54479)
14:59
[b3da26df] part of check-in [35b4d6e9] 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". (check-in: [35b4d6e9] user: drh branch: insert-optimization, size: 54272)
2013-11-18
11:20
[2ab0f538] part of check-in [8d002740] Fix harmless compiler warnings from clang scan-build. (check-in: [8d002740] user: drh branch: trunk, size: 54290)
2013-11-08
17:13
[78364dae] part of check-in [0077c077] Fix harmless compiler warnings. (check-in: [0077c077] user: drh branch: trunk, size: 54226)
2013-11-06
19:59
[53708407] part of check-in [defd5205] 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. (check-in: [defd5205] user: drh branch: omit-rowid, size: 54239)
2013-11-05
13:33
[c82c3aa5] part of check-in [54b22192] 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. (check-in: [54b22192] user: drh branch: omit-rowid, size: 54318)
2013-11-04
13:56
[24bbd27a] part of check-in [af128862] Correctly handle self-referential foreign keys on WITHOUT ROWID tables. (check-in: [af128862] user: drh branch: omit-rowid, size: 54356)
2013-11-03
02:27
[df809cab] part of check-in [1315d910] Improved comments on foreign key logic. (check-in: [1315d910] user: drh branch: omit-rowid, size: 52806)
2013-11-02
22:09
[8dc2b14d] part of check-in [39e32187] 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. (check-in: [39e32187] user: drh branch: omit-rowid, size: 52690)
2013-10-22
18:01
[628f8117] part of check-in [a106ce86] 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. (check-in: [a106ce86] user: drh branch: omit-rowid, size: 52662)
2013-10-12
15:12
[5dc10cba] part of check-in [27001356] Fix handling of "DROP TABLE" commands when "PRAGMA defer_foreign_keys=1" is set. (check-in: [27001356] user: dan branch: trunk, size: 52662)
2013-09-05
18:40
[be866cd8] part of check-in [e940b5de] 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. (check-in: [e940b5de] user: dan branch: trunk, size: 52385)
2013-07-11
12:19
[914a6bbd] part of check-in [3a2ab74c] Rename the SQLITE_DeferForeignKeys macro to shorter SQLITE_DeferFKs. Move the "defer_foreign_keys" pragma into the flagPragma() routine. (check-in: [3a2ab74c] user: drh branch: sessions, size: 50000)
2013-07-04
15:22
[87619fc3] part of check-in [1452defb] Fix a bug preventing some FK constraint checking from being deferred until the end of changeset application. (check-in: [1452defb] user: dan branch: sessions, size: 50016)
2013-07-03
19:53
[ddd160ce] part of check-in [1d44e5d3] 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. (check-in: [1d44e5d3] user: dan branch: sessions, size: 49967)
2013-02-09
13:58
[e16942bd] part of check-in [54611046] Add extended error codes for constraint errors. (check-in: [54611046] user: drh branch: constraint-error-codes, size: 49903)
2012-12-17
20:40
[5b7a12e2] part of check-in [0f996352] 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. (check-in: [0f996352] user: drh branch: foreign-key-check, size: 49817)
16:46
[21fb5984] part of check-in [01c980e9] Prototype for PRAGMA that checks all foreign key constraints on a table. (check-in: [01c980e9] user: drh branch: foreign-key-check, size: 49734)
2012-12-08
03:34
[dcb7c37a] part of check-in [7b96115e] Veryquick passes all tests now. (check-in: [7b96115e] user: drh branch: ticket-71e333e7, size: 49712)
2012-12-07
18:38
[ddf44f8c] part of check-in [972443b4] Some errors in veryquick resolved. Many more to go. (check-in: [972443b4] user: drh branch: ticket-71e333e7, size: 49609)
14:02
[0ef356ae] part of check-in [7fafab12] Veryquick now runs to completion without segfaulting or asserting. But there are still lots of errors. (check-in: [7fafab12] user: drh branch: ticket-71e333e7, size: 49730)
2012-12-06
21:16
[ca70996e] part of check-in [fd011cb2] 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. (check-in: [fd011cb2] user: drh branch: ticket-71e333e7, size: 49614)
2012-09-13
14:22
[c82a04e7] part of check-in [4163f5f1] Change boolean fields in the Column object from unsigned characters into bits in a single bit mask variable. (check-in: [4163f5f1] user: drh branch: trunk, size: 49602)
2012-08-25
00:49
[b792889e] part of check-in [865dfcba] 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. (check-in: [865dfcba] user: drh branch: branch-3.7.2, size: 48107)
2012-08-24
18:44
[9c77d842] part of check-in [a3e26038] Fix a problem to do with multi-or queries and automatic indexes. (check-in: [a3e26038] user: dan branch: multi-or-covering-index, size: 49558)
2012-07-18
16:07
[7d1ec22d] part of check-in [defd828e] Remove another branch from the DbMalloc() paths. (check-in: [defd828e] user: dan branch: calloc, size: 49523)
2011-10-25
20:36
[ca7cdb31] part of check-in [14bc58ca] Cherrypick changes [53f5cfe115] and [1f7ef0af8d] in order to fix an issue with DISTINCT (check-in: [14bc58ca] user: drh branch: branch-3.7.2, size: 48104)
2011-10-14
21:49
[65721246] part of check-in [60fee957] 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. (check-in: [60fee957] user: drh branch: trunk, size: 49555)
2011-08-22
20:33
[9f00ea98] part of check-in [6c227cc8] Remove an unreachable branch in the FK code. (check-in: [6c227cc8] user: drh branch: trunk, size: 49531)
09:54
[c92c8eec] part of check-in [3f3acee4] Fix for [b1d3a2e531]. (check-in: [3f3acee4] user: dan branch: trunk, size: 49549)
2011-07-02
13:34
[d56da9f6] part of check-in [c593792c] Cherrypick [45e581bff7] into the 3.7.2 branch. (check-in: [c593792c] user: dan branch: branch-3.7.2, size: 48105)
2011-06-30
20:17
[c8492fed] part of check-in [f7ba0219] Experimental changes to improve optimization of DISTINCT queries. (check-in: [f7ba0219] user: dan branch: experimental, size: 48645)
2011-06-10
16:33
[9fabba17] part of check-in [442d8d8b] Fix minor problems with foreign key constraints where the parent table is the same as the child table. (check-in: [442d8d8b] user: dan branch: trunk, size: 48642)
2011-04-05
13:12
[a43ba8a0] part of check-in [5db4511d] 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. (check-in: [5db4511d] user: drh branch: trunk, size: 48088)
12:25
[8ab7ace4] part of check-in [bf664b20] 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. (check-in: [bf664b20] user: drh branch: trunk, size: 48021)
2011-04-04
18:22
[387c9b45] part of check-in [ae8374af] Add a description of access rules for the Schema object and lots of asserts to verify that the access rules are followed. (check-in: [ae8374af] user: drh branch: schema-parse-refactor, size: 48078)
2011-03-06
21:28
[418b8400] part of check-in [01a79d5a] Remove dead code identified by the clang static analyzer. (check-in: [01a79d5a] user: drh branch: trunk, size: 48011)
2010-09-28
00:25
[17950a28] part of check-in [d0342f4b] Continuing work toward detecting and fixing shallow-copy misuse. (check-in: [d0342f4b] user: drh branch: bug-b351d95f9c, size: 48101)
2010-07-29
01:50
[58bbf52c] part of check-in [53902f7d] Correct handling of compound foreign key constraints that include the integer primary key as one of the columns. Ticket [ce7c133ea6cc9ccdc1] (check-in: [53902f7d] user: drh branch: trunk, size: 48102)
2010-07-24
11:28
[cacfe3e2] part of check-in [9aa30342] Experimental code to measure memory consumed by database schemas and prepared statements. (check-in: [9aa30342] user: dan branch: experimental, size: 48067)
2010-07-23
17:06
[62eed881] part of check-in [5c58f44a] Remove additional traces (mostly in comments) of the Table.dbMem field. (check-in: [5c58f44a] user: drh branch: trunk, size: 48012)
15:41
[31b8dc8e] part of check-in [6eddc6e6] Remove the Table.dbMem variable, as it is no longer being used for its original purpose. (check-in: [6eddc6e6] user: dan branch: trunk, size: 48224)
2009-11-12
19:59
[e2116672] part of check-in [b9eab885] 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. (check-in: [b9eab885] user: drh branch: trunk, size: 48238)
2009-10-13
13:08
[41219cba] part of check-in [5d381daa] Suppress some harmless compiler warnings. (check-in: [5d381daa] user: drh branch: trunk, size: 48232)
2009-10-12
22:30
[34ee2b0d] part of check-in [634ef4fc] Add asserts as evidence that all FK constraints are either immediate or deferred. (check-in: [634ef4fc] user: drh branch: trunk, size: 48221)
20:01
[2b79b385] part of check-in [a4ab5215] 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. (check-in: [a4ab5215] user: drh branch: trunk, size: 48096)
2009-10-07
16:04
[6d27707f] part of check-in [5caa4a2b] Add a missing OP_Close opcode to VDBE programs that check for FK constraint violations. (check-in: [5caa4a2b] user: dan branch: trunk, size: 47995)
2009-10-03
07:04
[720f049d] part of check-in [3c24df38] Handle an SQLITE_IGNORE returned when requesting authorization to read parent key columns by pretending the parent key columns contain NULL values. (check-in: [3c24df38] user: dan branch: trunk, size: 47955)
2009-10-02
14:23
[bcc2af88] part of check-in [9842f2d5] When inserting a row into a child table, invoke the authorization callback to request permission to read the parent key columns. (check-in: [9842f2d5] user: dan branch: trunk, size: 47490)
2009-10-01
16:09
[b20074e0] part of check-in [edff3500] If an update does not modify any child or parent key columns, omit foreign key processing for the statement. (check-in: [edff3500] user: dan branch: trunk, size: 47216)
2009-09-30
08:11
[8b438b1f] part of check-in [0a0a17d8] Remove unreachable branches from fkey.c. Add a few tests to cover the remaining branches. (check-in: [0a0a17d8] user: dan branch: trunk, size: 46423)
2009-09-29
16:38
[e1128e8d] part of check-in [9a4b7ec2] Use the affinity and collation sequence associated with the parent key when finding child table rows to apply a foreign key action to. (check-in: [9a4b7ec2] user: dan branch: trunk, size: 46663)
15:41
[aed9dc4c] part of check-in [64154174] Check that a unique index uses the default collation sequences for each column before using it as part of a foreign key constraint operation. (check-in: [64154174] user: dan branch: trunk, size: 46453)
11:28
[93b4f9a9] part of check-in [582bd768] Remove an unused variable from fkey.c. (check-in: [582bd768] user: dan branch: trunk, size: 45756)
2009-09-28
18:52
[e31715c1] part of check-in [5b4d4637] Ignore foreign key mismatch errors while compiling DROP TABLE commands. (check-in: [5b4d4637] user: dan branch: trunk, size: 46033)
14:49
[8c5deb17] part of check-in [8353808c] Fix the DROP TABLE command so that it cannot be used to bypass foreign key constraints (if foreign key support is enabled). (check-in: [8353808c] user: dan branch: trunk, size: 45687)
11:54
[5bbe13f5] part of check-in [9e503e2d] Fix some foreign key constraint related problems that occur when a row refers to itself. (check-in: [9e503e2d] user: dan branch: trunk, size: 43372)
2009-09-26
17:51
[ee4e0d24] part of check-in [b4a10c39] 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. (check-in: [b4a10c39] user: dan branch: trunk, size: 41490)
2009-09-25
17:03
[542de974] part of check-in [519144ac] 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. (check-in: [519144ac] user: dan branch: trunk, size: 41452)
12:00
[8719d0fa] part of check-in [9fd54b0a] Fix comments in fkey2.c to reflect the immediate-constraint-counter approach. (check-in: [9fd54b0a] user: dan branch: trunk, size: 40886)
2009-09-24
18:19
[5ec139b6] part of check-in [76e8e74b] 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. (check-in: [76e8e74b] user: dan branch: trunk, size: 39637)
15:16
[d5610f84] part of check-in [8a000a8a] Fix a problem in fkey.c when a child key is the IPK of its table. (check-in: [8a000a8a] user: dan branch: trunk, size: 38786)
14:27
[ba7fa13d] part of check-in [36568963] Remove the ALWAYS() added by the previous check-in. It is not needed. (check-in: [36568963] user: drh branch: trunk, size: 38798)
13:48
[3a5f73fd] part of check-in [d5b714cf] Comment enhancements. Add an ALWAYS macro in fkey.c to indicate a branch that is always taken. (check-in: [d5b714cf] user: drh branch: trunk, size: 38840)
2009-09-23
18:07
[a1c293cc] part of check-in [e0a48d53] Fix a problem with FK constraints that implicitly map to a composite primary key. (check-in: [e0a48d53] user: dan branch: trunk, size: 38759)
17:30
[89232758] part of check-in [1a32149c] Do not check immediate foreign key constraints until the end of the statement. This matches the postgres behaviour. (check-in: [1a32149c] user: dan branch: trunk, size: 38855)
13:59
[9a0afe07] part of check-in [a5f7e71f] Disallow using the implicit rowid column as the parent key of an FK constraint. (check-in: [a5f7e71f] user: dan branch: trunk, size: 38791)
12:06
[320b318d] part of check-in [7d086afe] Add extra tests for foreign key support. (check-in: [7d086afe] user: dan branch: trunk, size: 38923)
08:43
[da1a63c1] part of check-in [540c2d18] 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. (check-in: [540c2d18] user: dan branch: trunk, size: 38951)
03:01
[de296942] part of check-in [71ac8e28] Do not run ON UPDATE actions of a foreign key constraint unless at least one column value really does change. (check-in: [71ac8e28] user: drh branch: trunk, size: 31648)
2009-09-22
16:55
[fa1ad144] part of check-in [e2bc51bc] Fix another OOM related problem in fkey.c. (check-in: [e2bc51bc] user: dan branch: trunk, size: 30668)
16:08
[db2225a0] part of check-in [94069950] Fix a problem with ON DELETE SET DEFAULT actions. (check-in: [94069950] user: dan branch: trunk, size: 30564)
15:53
[2c20574e] part of check-in [635d6a77] Fix an OOM related crash in fkey.c. (check-in: [635d6a77] user: dan branch: trunk, size: 30576)
2009-09-21
18:56
[6aad270a] part of check-in [84129052] Fix a problem with foreign key constraints that map from and IPK column. (check-in: [84129052] user: dan branch: trunk, size: 29691)
16:06
[0f06ecda] part of check-in [fb6ceed3] Fix compilation with OMIT_TRIGGER defined. Ticket [1ff6d29030]. (check-in: [fb6ceed3] user: dan branch: trunk, size: 29442)
2009-09-19
17:00
Added: [77a358c5] part of check-in [d5d39981] Check in implementation of foreign key constraints. (check-in: [d5d39981] user: dan branch: trunk, size: 29302)