1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Register-ify the OP_AddImm and all casting opcodes. Omit the

OP_MemIncr opcode. (CVS 4683)

FossilOrigin-Name: 3e8a07dd3cc9921ad39e379576abb0b485a42202
This commit is contained in:
drh
2008-01-05 05:20:10 +00:00
parent b1fdb2adea
commit 8558cde1ab
12 changed files with 100 additions and 120 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
**
** $Id: delete.c,v 1.149 2008/01/05 04:06:04 drh Exp $
** $Id: delete.c,v 1.150 2008/01/05 05:20:10 drh Exp $
*/
#include "sqliteInt.h"
@@ -290,7 +290,7 @@ void sqlite3DeleteFrom(
sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
}
sqlite3VdbeAddOp2(v, OP_Rewind, iCur, sqlite3VdbeCurrentAddr(v)+2);
addr2 = sqlite3VdbeAddOp2(v, OP_MemIncr, 1, memCnt);
addr2 = sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);
sqlite3VdbeAddOp2(v, OP_Next, iCur, addr2);
sqlite3VdbeAddOp1(v, OP_Close, iCur);
}
@@ -321,7 +321,7 @@ void sqlite3DeleteFrom(
sqlite3VdbeAddOp2(v, IsVirtual(pTab) ? OP_VRowid : OP_Rowid, iCur, iRowid);
sqlite3VdbeAddOp1(v, OP_FifoWrite, iRowid);
if( db->flags & SQLITE_CountRows ){
sqlite3VdbeAddOp2(v, OP_MemIncr, 1, memCnt);
sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);
}
/* End the database scan loop.