mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Small optimization in FK handling.
FossilOrigin-Name: e0d25913b73a813f5987aa70b364b00f19351663
This commit is contained in:
@@ -1162,11 +1162,12 @@ static Trigger *fkActionTrigger(
|
||||
int iAction = (pChanges!=0); /* 1 for UPDATE, 0 for DELETE */
|
||||
|
||||
action = pFKey->aAction[iAction];
|
||||
pTrigger = pFKey->apTrigger[iAction];
|
||||
if( (db->flags & SQLITE_DeferFKs) && action==OE_Restrict ){
|
||||
if( action==OE_Restrict && (db->flags & SQLITE_DeferFKs) ){
|
||||
return 0;
|
||||
}
|
||||
|
||||
pTrigger = pFKey->apTrigger[iAction];
|
||||
|
||||
if( action!=OE_None && !pTrigger ){
|
||||
char const *zFrom; /* Name of child table */
|
||||
int nFrom; /* Length in bytes of zFrom */
|
||||
|
||||
Reference in New Issue
Block a user