1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-19 21:43:15 +03:00

Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set.

FossilOrigin-Name: 8fea1166016c659ece83e0045bc348f478a9ba6a
This commit is contained in:
dan
2016-02-25 19:52:11 +00:00
5 changed files with 76 additions and 11 deletions

View File

@@ -1163,6 +1163,9 @@ static Trigger *fkActionTrigger(
action = pFKey->aAction[iAction];
pTrigger = pFKey->apTrigger[iAction];
if( (db->flags & SQLITE_DeferFKs) && action==OE_Restrict ){
return 0;
}
if( action!=OE_None && !pTrigger ){
char const *zFrom; /* Name of child table */