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

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
This commit is contained in:
dan
2009-09-28 14:49:01 +00:00
parent 9277efa3d5
commit d66c83095e
8 changed files with 111 additions and 15 deletions

View File

@@ -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)){