SQLite

Check-in [03cc91b3b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove a surplus OP_Close from delete.c. Fixes a problem with (4654). (CVS 4655)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 03cc91b3b0ff9be192532f8a404b3c7b827e1449
User & Date: drh 2008-01-02 13:05:51.000
Context
2008-01-02
14:28
Add opcodes OP_ResultRow and OP_RegMakeRec which are register-based equivalents to OP_Callback and OP_MakeRecord. Use the new opcodes. (CVS 4656) (check-in: 4c7f35da77 user: drh tags: trunk)
13:05
Remove a surplus OP_Close from delete.c. Fixes a problem with (4654). (CVS 4655) (check-in: 03cc91b3b0 user: drh tags: trunk)
11:50
Take advantage of the fact that b-tree cursors need not be closed while other cursors modify their tables to simplify trigger program generation code. (CVS 4654) (check-in: f1966a8a47 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/delete.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** 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.137 2008/01/02 11:50:51 danielk1977 Exp $
*/
#include "sqliteInt.h"

/*
** Look up every table that is named in pSrc.  If any table is not found,
** add an error message to pParse->zErrMsg and return NULL.  If all tables
** are found, return a pointer to the last table.







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** 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.138 2008/01/02 13:05:51 drh Exp $
*/
#include "sqliteInt.h"

/*
** Look up every table that is named in pSrc.  If any table is not found,
** add an error message to pParse->zErrMsg and return NULL.  If all tables
** are found, return a pointer to the last table.
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
      sqlite3VdbeAddOp(v, OP_Rowid, iCur, 0);
      if( old_col_mask ){
        sqlite3VdbeAddOp(v, OP_RowData, iCur, 0);
      }else{
        sqlite3VdbeAddOp(v, OP_Null, 0, 0);
      }
      sqlite3VdbeAddOp(v, OP_Insert, oldIdx, 0);
      if( !isView ){
        sqlite3VdbeAddOp(v, OP_Close, iCur, 0);
      }

      /* Jump back and run the BEFORE triggers */
      sqlite3VdbeAddOp(v, OP_Goto, 0, iBeginBeforeTrigger);
      sqlite3VdbeJumpHere(v, iEndBeforeTrigger);

      if( !isView ){
        sqlite3VdbeAddOp(v, OP_MemLoad, mem1, 0);







<
<
<







321
322
323
324
325
326
327



328
329
330
331
332
333
334
      sqlite3VdbeAddOp(v, OP_Rowid, iCur, 0);
      if( old_col_mask ){
        sqlite3VdbeAddOp(v, OP_RowData, iCur, 0);
      }else{
        sqlite3VdbeAddOp(v, OP_Null, 0, 0);
      }
      sqlite3VdbeAddOp(v, OP_Insert, oldIdx, 0);




      /* Jump back and run the BEFORE triggers */
      sqlite3VdbeAddOp(v, OP_Goto, 0, iBeginBeforeTrigger);
      sqlite3VdbeJumpHere(v, iEndBeforeTrigger);

      if( !isView ){
        sqlite3VdbeAddOp(v, OP_MemLoad, mem1, 0);