Commit Graph

17 Commits

Author SHA1 Message Date
dan f0662567fa Ignore foreign key mismatch errors while compiling DROP TABLE commands.
FossilOrigin-Name: 5b4d46374a8e808246a1813c12c36c4a75371898
2009-09-28 18:52:11 +00:00
dan d66c83095e Fix the DROP TABLE command so that it cannot be used to bypass foreign key constraints (if foreign key support is enabled).
FossilOrigin-Name: 8353808c9e70412fdee31bfda7810e948f1c7485
2009-09-28 14:49:01 +00:00
dan 9277efa3d5 Fix some foreign key constraint related problems that occur when a row refers to itself.
FossilOrigin-Name: 9e503e2d0428c9e8df878c7c6594790232cca4e0
2009-09-28 11:54:21 +00:00
dan 432cc5b9f3 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.
FossilOrigin-Name: b4a10c39e726dc190e9597e382baddc034294114
2009-09-26 17:51:48 +00:00
dan 0ff297eaa7 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.
FossilOrigin-Name: 519144ac437b5842e4213f0e81e05c709939c2ab
2009-09-25 17:03:14 +00:00
dan bd74783270 Fix comments in fkey2.c to reflect the immediate-constraint-counter approach.
FossilOrigin-Name: 9fd54b0aa73ed74c65f7db53cb666752f13263f9
2009-09-25 12:00:01 +00:00
dan 53c3fa8dbe Prevent ALTER TABLE from being used to add a column with a REFERENCES clause and a non-NULL default value while foreign key support is enabled.
FossilOrigin-Name: 353b1b18253ab71ba38a887e555994f5469b87bd
2009-09-25 11:26:54 +00:00
dan 140026bdb5 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.
FossilOrigin-Name: 76e8e74b49be4c80b9fb20d52e9b39db8001362e
2009-09-24 18:19:41 +00:00
dan 1bea559a94 Ensure foreign key related processing takes place when rows are deleted from the database by REPLACE conflict handling.
FossilOrigin-Name: 3f40c142c8526c1572020bd4d945c03a72019135
2009-09-24 11:31:21 +00:00
dan 32b09f29c9 Do not check immediate foreign key constraints until the end of the statement. This matches the postgres behaviour.
FossilOrigin-Name: 1a32149cc3c722058f4ed4c81edadeb6ce5bc9e4
2009-09-23 17:29:59 +00:00
dan d981d44781 Disallow using the implicit rowid column as the parent key of an FK constraint.
FossilOrigin-Name: a5f7e71f424900071a3925e53e9128c9148ea2e8
2009-09-23 13:59:17 +00:00
dan a8f0bf643e Add extra tests for foreign key support.
FossilOrigin-Name: 7d086afe69da4d03bd1de5408626858273f91e8f
2009-09-23 12:06:52 +00:00
dan 934ce300a0 Fix a problem with ON DELETE SET DEFAULT actions.
FossilOrigin-Name: 9406995055f53639b0af46985c7b0a24a80308ae
2009-09-22 16:08:58 +00:00
dan 29c7f9caac Fix an OOM related crash in fkey.c.
FossilOrigin-Name: 635d6a775a3f192d4292738905f5e01bc956a712
2009-09-22 15:53:47 +00:00
dan 3606264bc9 Fix a problem with foreign key constraints that map from and IPK column.
FossilOrigin-Name: 84129052623dc6a175c76db602ab07fa3e57f1eb
2009-09-21 18:56:23 +00:00
dan 75cbd984f7 Fix compilation with OMIT_TRIGGER defined. Ticket [1ff6d29030e9757d052af0f394e56bea96b8b59b|1ff6d29030].
FossilOrigin-Name: fb6ceed388f6d75bdc2ac2f43e5c98da74e2a448
2009-09-21 16:06:03 +00:00
dan 1da40a381f Check in implementation of foreign key constraints.
FossilOrigin-Name: d5d399811876391642937edeb9e8434dd9e356f5
2009-09-19 17:00:31 +00:00