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: 82470d1c3a41221c78bcdd402b2219c4c21c43af
This commit is contained in:
dan
2016-01-21 17:25:56 +00:00
parent e1ed0bb607
commit 2beb2c390b
4 changed files with 69 additions and 9 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 ){
u8 enableLookaside; /* Copy of db->lookaside.bEnabled */