aboutsummaryrefslogtreecommitdiff
path: root/src/delete.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2002-05-23 12:50:18 +0000
committerdrh <drh@noemail.net>2002-05-23 12:50:18 +0000
commit07d6e3a74c4c08be68d7f54065bad58c8e7cec2c (patch)
tree529d12f6d864d8e94fbccf71d24d29239cfd48b5 /src/delete.c
parente4697f5e9031c0cb5a06a6bb4b0c8cb39a26ce7f (diff)
downloadsqlite-07d6e3a74c4c08be68d7f54065bad58c8e7cec2c.tar.gz
sqlite-07d6e3a74c4c08be68d7f54065bad58c8e7cec2c.zip
Partial fix for ticket #49. The correct result is computed, but now we have
a memory leak. I'm not sure if the memory leak was pre-existing or a result of this change. (CVS 581) FossilOrigin-Name: 4d27ee411902a197cd72416ca9da9197d3f87f13
Diffstat (limited to 'src/delete.c')
-rw-r--r--src/delete.c6
1 files changed, 4 insertions, 2 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));
}
/*