aboutsummaryrefslogtreecommitdiff
path: root/src/trigger.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2009-09-28 14:49:01 +0000
committerdan <dan@noemail.net>2009-09-28 14:49:01 +0000
commitd66c83095edcfb0f26e7ddf24f28455048d02b12 (patch)
treeafb321fdcb5fb10572e6b895a621ca79b8166b19 /src/trigger.c
parent9277efa3d576ab243077404bb5966f9a67a73004 (diff)
downloadsqlite-d66c83095edcfb0f26e7ddf24f28455048d02b12.tar.gz
sqlite-d66c83095edcfb0f26e7ddf24f28455048d02b12.zip
Fix the DROP TABLE command so that it cannot be used to bypass foreign key constraints (if foreign key support is enabled).
FossilOrigin-Name: 8353808c9e70412fdee31bfda7810e948f1c7485
Diffstat (limited to 'src/trigger.c')
-rw-r--r--src/trigger.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/trigger.c b/src/trigger.c
index dfe8e9a17..319f9bc70 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -50,6 +50,10 @@ Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
Schema * const pTmpSchema = pParse->db->aDb[1].pSchema;
Trigger *pList = 0; /* List of triggers to return */
+ if( pParse->disableTriggers ){
+ return 0;
+ }
+
if( pTmpSchema!=pTab->pSchema ){
HashElem *p;
for(p=sqliteHashFirst(&pTmpSchema->trigHash); p; p=sqliteHashNext(p)){