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

Refactor parts of write operations. (CVS 1268)

FossilOrigin-Name: 5b0147aece7785373e6f7439c32e5f58c6b12562
This commit is contained in:
drh
2004-02-24 01:05:31 +00:00
parent 02f75f19e5
commit cd44690ad0
6 changed files with 42 additions and 45 deletions

View File

@@ -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.60 2004/02/20 22:53:39 rdc Exp $
** $Id: delete.c,v 1.61 2004/02/24 01:05:32 drh Exp $
*/
#include "sqliteInt.h"
@@ -253,12 +253,7 @@ void sqliteDeleteFrom(
** cursors are opened only once on the outside the loop.
*/
pParse->nTab = iCur + 1;
sqliteVdbeAddOp(v, OP_Integer, pTab->iDb, 0);
sqliteVdbeAddOp(v, OP_OpenWrite, iCur, pTab->tnum);
for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
sqliteVdbeAddOp(v, OP_Integer, pIdx->iDb, 0);
sqliteVdbeAddOp(v, OP_OpenWrite, pParse->nTab++, pIdx->tnum);
}
sqliteOpenTableAndIndices(pParse, pTab, iCur);
/* This is the beginning of the delete loop when there are no
** row triggers */