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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user