1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add the ability to enable and disable foreign key constraints and triggers

using calls to sqlite3_db_config().

FossilOrigin-Name: 09e167f9c14625924b17bbb1f292f89ac9ddc93a
This commit is contained in:
drh
2011-03-21 17:15:58 +00:00
parent 8ce0261d09
commit e83cafd2f0
9 changed files with 78 additions and 28 deletions

View File

@@ -623,8 +623,12 @@ Trigger *sqlite3TriggersExist(
int *pMask /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
){
int mask = 0;
Trigger *pList = sqlite3TriggerList(pParse, pTab);
Trigger *pList = 0;
Trigger *p;
if( (pParse->db->flags & SQLITE_EnableTrigger)!=0 ){
pList = sqlite3TriggerList(pParse, pTab);
}
assert( pList==0 || IsVirtual(pTab)==0 );
for(p=pList; p; p=p->pNext){
if( p->op==op && checkColumnOverlap(p->pColumns, pChanges) ){