/ Check-in [86332c79]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 86332c79aedb64842e589ff941c637f8e1aabd41
User & Date: danielk1977 2007-12-12 17:19:27
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: 12c3029b user: danielk1977 tags: trunk
17:19
Remove a couple of lines in delete.c that weren't doing anything. (CVS 4616) check-in: 86332c79 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: ee98ae17 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/delete.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that are called by the parser
    13     13   ** in order to generate code for DELETE FROM statements.
    14     14   **
    15         -** $Id: delete.c,v 1.132 2007/12/12 16:06:23 danielk1977 Exp $
           15  +** $Id: delete.c,v 1.133 2007/12/12 17:19:27 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   /*
    20     20   ** Look up every table that is named in pSrc.  If any table is not found,
    21     21   ** add an error message to pParse->zErrMsg and return NULL.  If all tables
    22     22   ** are found, return a pointer to the last table.
................................................................................
   213    213     ** It is easier just to erase the whole table.  Note, however, that
   214    214     ** this means that the row change count will be incorrect.
   215    215     */
   216    216     if( pWhere==0 && !triggers_exist && !IsVirtual(pTab) ){
   217    217       if( db->flags & SQLITE_CountRows ){
   218    218         /* If counting rows deleted, just count the total number of
   219    219         ** entries in the table. */
   220         -      int endOfLoop = sqlite3VdbeMakeLabel(v);
   221    220         int addr2;
   222    221         if( !isView ){
   223    222           sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
   224    223         }
   225    224         sqlite3VdbeAddOp(v, OP_Rewind, iCur, sqlite3VdbeCurrentAddr(v)+2);
   226    225         addr2 = sqlite3VdbeAddOp(v, OP_MemIncr, 1, memCnt);
   227    226         sqlite3VdbeAddOp(v, OP_Next, iCur, addr2);
   228         -      sqlite3VdbeResolveLabel(v, endOfLoop);
   229    227         sqlite3VdbeAddOp(v, OP_Close, iCur, 0);
   230    228       }
   231    229       if( !isView ){
   232    230         sqlite3VdbeAddOp(v, OP_Clear, pTab->tnum, iDb);
   233    231         if( !pParse->nested ){
   234    232           sqlite3VdbeChangeP3(v, -1, pTab->zName, P3_STATIC);
   235    233         }