aboutsummaryrefslogtreecommitdiff
path: root/src/fkey.c
Commit message (Collapse)AuthorAge
...
* Fix a memory leak when a WITHOUT ROWID eponymous virtual table is used.drh2016-06-03
| | | FossilOrigin-Name: 31b83a7d7e553163eb186fc966a885f237554ec2
* Remove a redundant test for disabling RESTRICT with defer_foreign_keys=ON.drh2016-03-30
| | | FossilOrigin-Name: 9cdf813c6aaaddc01d2d4e04636c83fcda04d971
* Merge recent enhancements from trunk. Default page size is 4096. Writesdrh2016-03-04
|\ | | | | | | | | to statement journals are avoided. FossilOrigin-Name: 456df3365e2df60e34762f2024bb551538b3f72b
| * Small optimization in FK handling.mistachkin2016-02-25
| | | | | | FossilOrigin-Name: e0d25913b73a813f5987aa70b364b00f19351663
| * Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set.dan2016-02-25
| | | | | | FossilOrigin-Name: 9ffff484bb4b67c29dda6180d7d766ad13988fe1
* | Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set.dan2016-02-25
|\ \ | |/ |/| FossilOrigin-Name: 8fea1166016c659ece83e0045bc348f478a9ba6a
| * Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set.dan2016-01-21
| | | | | | FossilOrigin-Name: 82470d1c3a41221c78bcdd402b2219c4c21c43af
* | Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majoritydrh2016-02-05
| | | | | | | | | | cases where db is guaranteed to be not NULL. FossilOrigin-Name: 0a802e96ab06e2643834b83671fa8353da1a348d
* | Improvements to the way that OOM errors are processed.drh2016-02-05
| | | | | | FossilOrigin-Name: c3ef03478a5788c855b3aef385d43ae7f494f440
* | Add the sqlite3TokenInit() utility function.drh2016-01-22
|/ | | FossilOrigin-Name: 7323175337b7ba85ac932ca892b28860f6a5b688
* Changes to the way that the default BINARY collating sequence is recordeddrh2015-12-30
| | | | | | result in a slightly smaller and slightly faster executable. More work could be done to make this cleaner. FossilOrigin-Name: 2081d75767dc590b4c8457e5f8e5f18ba5f8eaa7
* Use symbolic names XN_ROWID and XN_EXPR in place of the (-1) and (-2)drh2015-09-29
| | | | | | | 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. FossilOrigin-Name: 7d272aa62cd4cbbf4b5d04e3b918de27671e8301
* Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to helpdrh2015-09-03
| | | | | | with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto() to just sqlite3VdbeGoto(). FossilOrigin-Name: 847387ec8e6fef283899578fb232b2c23b00ee5b
* Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand fordrh2015-09-02
| | | | | sqlite3VdbeAddOp2(v,OP_Goto,0,i). FossilOrigin-Name: be78f413df1b0d874b44a866ef6bf17543d7e8a2
* Use the sqlite3IndexColumnAffinity() routine to quickly and correctly find thedrh2015-08-25
| | | | | affinity of an index column. FossilOrigin-Name: 1ee089a72d789002a0a377347fc51e08ab32fb14
* Ensure that tables names are dequoted exactly once by the trigger logic.dan2015-04-21
| | | FossilOrigin-Name: 9d887b92f8086961e045f8acb9ee7a443796d411
* Fix some identifier name de-quoting issues in the foreign key and trigger logic.drh2015-04-21
| | | FossilOrigin-Name: 59e92bd9521f1e8315a9a7e7fd3d63b0c75eaf0e
* Fix foreign key CASCADE for cases where the parent key is an INTEGER PRIMARYdrh2015-04-10
| | | | | | KEY and the parent table contains other columns named "rowid", "_rowid_", and "oid". FossilOrigin-Name: ed3cbaab6ad49b0cb5b17e44def26c866919387a
* Fix some comments in fkey.c. Add tests to fkey8.test.dan2014-12-17
| | | FossilOrigin-Name: 210cb2a6aaf780365064a26c0c99926bd6346e19
* Experimental opimizations to speed up FK constraint CASCADE and SET NULL ↵dan2014-12-16
| | | | | action processing. FossilOrigin-Name: 35a20a5f22245c70faa51965951e8cc011defa93
* Fix typos in comments. No code changes.peter.d.reid2014-09-06
| | | FossilOrigin-Name: e62aab5e9290503869e1f4d5e0fefd2b4dee0a69
* Simplify the interface to the symbol table, saving 600 bytes of code space.drh2014-08-21
| | | FossilOrigin-Name: 14b0f561fe15622b61c6676c9c455dca6b9ba5f0
* Refactoring: Change "pIndex->onError!=OE_None" to use a macro:drh2014-07-31
| | | | | "IsUniqueIndex(pIndex)". Easier to understand that way. FossilOrigin-Name: e75b26ee357bb3d3c1a539b05d633ebf314726d7
* Change the name of the Index.autoIndex field to Index.idxType and providedrh2014-05-27
| | | | | | symbolic names for the various values of that field rather than using magic numbers. FossilOrigin-Name: d16e575dacc811de0f7b58a0d1cd243678dce6c5
* Add the SQLITE_NOTNULL P5 code for comparison operations - really a compositedrh2014-02-19
| | | | | | | | 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. FossilOrigin-Name: d2c047f304848e49864ed8c216b48fd671fa3916
* Add logic to do test coverage measurements on the VDBE code.drh2014-02-17
| | | FossilOrigin-Name: ce184c7bb16988641d37c908d9b3042456d4be3d
* Avoid unnecessary calls to applyAffinity() during INSERT and UPDATEdrh2014-02-17
| | | | | | operations, especially for table that have indices and tables for which all columns have affinity "NONE". FossilOrigin-Name: 35b4d6e938164fabaf30b504c54cfd9a69060cee
* Fix harmless compiler warnings from clang scan-build.drh2013-11-18
| | | FossilOrigin-Name: 8d002740bffca2a76d2dfbc1a67293d34f9de9ba
* Fix harmless compiler warnings.drh2013-11-08
| | | FossilOrigin-Name: 0077c0772a884b54d81fa3733aac6f0c364ef1a8
* Reference count the KeyInfo object. Cache a copy of an appropriate KeyInfodrh2013-11-06
| | | | | for each index in the Index object, and reuse that one copy as much as possible. FossilOrigin-Name: defd5205a7cc3543cdd18f906f568e943b8b3a2c
* Standardize the error messages generated by constraint failures to a formatdrh2013-11-05
| | | | | | of "$TYPE constraint failed: $DETAIL". This involves many changes to the expected output of test cases. FossilOrigin-Name: 54b221929744b1bcdbcc2030fef2e510618afd41
* Correctly handle self-referential foreign keys on WITHOUT ROWID tables.drh2013-11-04
| | | FossilOrigin-Name: af128862ab6008df9dda1ee90f93f9efd629e259
* Improved comments on foreign key logic.drh2013-11-03
| | | FossilOrigin-Name: 1315d9109c7105f4a62bb2d43ca6948d41245129
* Many new test cases added, that mostly work. Currently 18 errors in drh2013-11-02
| | | | | | without_rowid3.test. Also there is a hack marked by a /*FIXME*/ comment on at fkey.c:547 that needs fixing. FossilOrigin-Name: 39e32187b66405e00dbd44685f6cdd269c90f5e5
* The Index object now has nKeyCol and nColumn. nColumn is the total numberdrh2013-10-22
| | | | | | 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. FossilOrigin-Name: a106ce86cd4afd1f81603826de77df1fb25e9ab5
* Fix handling of "DROP TABLE" commands when "PRAGMA defer_foreign_keys=1" is set.dan2013-10-12
| | | FossilOrigin-Name: 27001356ed8201529b3f31d4313f2010f1b4e1b1
* When preparing an UPDATE statement, avoid generating VDBE code for those ↵dan2013-09-05
| | | | | 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. FossilOrigin-Name: e940b5de49baa1d6a4cf859fbbc0e0df86ac5dbf
* Add the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKSdrh2013-07-11
| | | | | | value for sqlite3_db_status(). This is a cherry-pick of a sequence of five checkins in the sessions branch between [1d44e5d3c2] and [d39e65fe70]. FossilOrigin-Name: 527121ac3cdc96ac33ad975c227a6685a2f7e999
* Add extended error codes for constraint errors.drh2013-02-09
| | | FossilOrigin-Name: 5461104668a49529577f21df97f6a0e7d8f0c679
* Enhance the error message for "foreign key mismatch" to include the names ofdrh2012-12-17
| | | | | | | 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. FossilOrigin-Name: 0f9963526c299757ff95c153fb05a67cddb6af28
* Prototype for PRAGMA that checks all foreign key constraints on a table.drh2012-12-17
| | | FossilOrigin-Name: 01c980e9bbdf82e0b37667b6403c19ed8c73ee62
* Veryquick passes all tests now.drh2012-12-08
| | | FossilOrigin-Name: 7b96115e81deab0aa0472839cf787ba3f2fc64a7
* Some errors in veryquick resolved. Many more to go.drh2012-12-07
| | | FossilOrigin-Name: 972443b4eb282d45507da06c75e2cd46dd72326b
* Veryquick now row to completion without segfaulting or asserting. But theredrh2012-12-07
| | | | | are still lots of errors. FossilOrigin-Name: 7fafab12e4c0c832c421975f8329c3214403d281
* Remove the Expr.pColl field and compute the collating sequence as it is needed.drh2012-12-06
| | | | | | 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. FossilOrigin-Name: fd011cb22f2d899d94ec7ce22641d7a8f5e19972
* Change boolean fields in the Column object from unsigned characters intodrh2012-09-13
| | | | | bits in a single bit mask variable. FossilOrigin-Name: 4163f5f194741bc2bdf141973912661c6aac70f1
* Fix a problem to do with multi-or queries and automatic indexes.dan2012-08-24
| | | FossilOrigin-Name: a3e26038a1d9f3331239f777c67d1920d904aab0
* Add assert() statements and eliminate needless variable assignments in orderdrh2011-10-14
| | | | | | | 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. FossilOrigin-Name: 60fee9574b0125705787e33c16f116cf188c8323
* Remove an unreachable branch in the FK code.drh2011-08-22
| | | FossilOrigin-Name: 6c227cc85378fa6041703d6620031c0e0a2db55f
* Fix for [b1d3a2e531].dan2011-08-22
| | | FossilOrigin-Name: 3f3acee465a6e390301f9dc588dd1d8e0bd646bd