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: 82470d1c3a41221c78bcdd402b2219c4c21c43af
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 ){
|
||||
u8 enableLookaside; /* Copy of db->lookaside.bEnabled */
|
||||
|
||||
Reference in New Issue
Block a user