diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/delete.c | 6 | ||||
-rw-r--r-- | src/update.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/delete.c b/src/delete.c index bcbe5ea81..7ed2dca44 100644 --- a/src/delete.c +++ b/src/delete.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle DELETE FROM statements. ** -** $Id: delete.c,v 1.34 2002/05/21 11:38:11 drh Exp $ +** $Id: delete.c,v 1.35 2002/05/23 12:50:18 drh Exp $ */ #include "sqliteInt.h" @@ -332,9 +332,11 @@ void sqliteGenerateRowDelete( int base, /* Cursor number for the table */ int count /* Increment the row change counter */ ){ - sqliteVdbeAddOp(v, OP_MoveTo, base, 0); + int addr; + addr = sqliteVdbeAddOp(v, OP_NotExists, base, 0); sqliteGenerateRowIndexDelete(v, pTab, base, 0); sqliteVdbeAddOp(v, OP_Delete, base, count); + sqliteVdbeChangeP2(v, addr, sqliteVdbeCurrentAddr(v)); } /* diff --git a/src/update.c b/src/update.c index 95923ec18..89dbd1104 100644 --- a/src/update.c +++ b/src/update.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle UPDATE statements. ** -** $Id: update.c,v 1.40 2002/05/21 11:38:12 drh Exp $ +** $Id: update.c,v 1.41 2002/05/23 12:50:19 drh Exp $ */ #include "sqliteInt.h" @@ -287,7 +287,7 @@ void sqliteUpdate( addr = sqliteVdbeAddOp(v, OP_ListRead, 0, 0); sqliteVdbeAddOp(v, OP_Dup, 0, 0); } - sqliteVdbeAddOp(v, OP_MoveTo, base, 0); + sqliteVdbeAddOp(v, OP_NotExists, base, addr); /* If the record number will change, push the record number as it ** will be after the update. (The old record number is currently |