SQLite

Check-in [86332c79ae]
Login

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

Overview
Comment:Remove a couple of lines in delete.c that weren't doing anything. (CVS 4616)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 86332c79aedb64842e589ff941c637f8e1aabd41
User & Date: danielk1977 2007-12-12 17:19:27.000
Context
2007-12-12
17:42
Try to find some more stack leaks by adding OP_StackDepth to loops in DML statements. None were found. (CVS 4617) (check-in: 12c3029b1e user: danielk1977 tags: trunk)
17:19
Remove a couple of lines in delete.c that weren't doing anything. (CVS 4616) (check-in: 86332c79ae user: danielk1977 tags: trunk)
16:06
Fix some problems similar to #2832, but caused by triggers instead of an OR REPLACE clause. (CVS 4615) (check-in: ee98ae1718 user: danielk1977 tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/delete.c.
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
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.132 2007/12/12 16:06:23 danielk1977 Exp $
** $Id: delete.c,v 1.133 2007/12/12 17:19:27 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.
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
213
214
215
216
217
218
219

220
221
222
223
224
225
226

227
228
229
230
231
232
233







-







-







  ** It is easier just to erase the whole table.  Note, however, that
  ** this means that the row change count will be incorrect.
  */
  if( pWhere==0 && !triggers_exist && !IsVirtual(pTab) ){
    if( db->flags & SQLITE_CountRows ){
      /* If counting rows deleted, just count the total number of
      ** entries in the table. */
      int endOfLoop = sqlite3VdbeMakeLabel(v);
      int addr2;
      if( !isView ){
        sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
      }
      sqlite3VdbeAddOp(v, OP_Rewind, iCur, sqlite3VdbeCurrentAddr(v)+2);
      addr2 = sqlite3VdbeAddOp(v, OP_MemIncr, 1, memCnt);
      sqlite3VdbeAddOp(v, OP_Next, iCur, addr2);
      sqlite3VdbeResolveLabel(v, endOfLoop);
      sqlite3VdbeAddOp(v, OP_Close, iCur, 0);
    }
    if( !isView ){
      sqlite3VdbeAddOp(v, OP_Clear, pTab->tnum, iDb);
      if( !pParse->nested ){
        sqlite3VdbeChangeP3(v, -1, pTab->zName, P3_STATIC);
      }