1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Do not delete tables with the same name when dropping triggers.

Ticket #430. (CVS 1074)

FossilOrigin-Name: ef58f163b08d13f8e9b69459bd83e0bf9d5b404b
This commit is contained in:
drh
2003-08-16 12:37:51 +00:00
parent 8e18bac793
commit 9b1b01bb76
5 changed files with 60 additions and 16 deletions

View File

@@ -450,14 +450,15 @@ void sqliteDropTriggerPtr(Parse *pParse, Trigger *pTrigger, int nested){
if( pTable!=0 && !nested && (v = sqliteGetVdbe(pParse))!=0 ){
int base;
static VdbeOp dropTrigger[] = {
{ OP_Rewind, 0, ADDR(8), 0},
{ OP_Rewind, 0, ADDR(9), 0},
{ OP_String, 0, 0, 0}, /* 1 */
{ OP_MemStore, 1, 1, 0},
{ OP_MemLoad, 1, 0, 0}, /* 3 */
{ OP_Column, 0, 1, 0},
{ OP_Ne, 0, ADDR(7), 0},
{ OP_Ne, 0, ADDR(8), 0},
{ OP_String, 0, 0, "trigger"},
{ OP_Column, 0, 0, 0},
{ OP_Ne, 0, ADDR(8), 0},
{ OP_Delete, 0, 0, 0},
{ OP_Next, 0, ADDR(3), 0}, /* 7 */
{ OP_Next, 0, ADDR(1), 0}, /* 8 */
};
sqliteBeginWriteOperation(pParse, 0, 0);