/ Check-in [32998fe8]
Login

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

Overview
Comment:Remove benign reference to an uninitialized variable. Ticket #1590. (CVS 2890)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 32998fe8ed38a79eb79d8b13051b47bf74661e3c
User & Date: drh 2006-01-09 00:09:02
Context
2006-01-09
00:18
Fix timezone parsing in the date/time functions. Ticket #1587. (CVS 2891) check-in: 94c87b70 user: drh tags: trunk
00:09
Remove benign reference to an uninitialized variable. Ticket #1590. (CVS 2890) check-in: 32998fe8 user: drh tags: trunk
2006-01-08
18:10
Get LIMIT and OFFSET working again for negative limits and offsets. Ticket #1586. (CVS 2889) check-in: b2ac0be0 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.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   ** to handle SELECT statements in SQLite.
    14     14   **
    15         -** $Id: select.c,v 1.288 2006/01/08 18:10:18 drh Exp $
           15  +** $Id: select.c,v 1.289 2006/01/09 00:09:02 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   
    20     20   /*
    21     21   ** Allocate a new Select structure and return a pointer to that
    22     22   ** structure.
................................................................................
   383    383     Select *p,        /* The SELECT statement being coded */
   384    384     int iContinue,    /* Jump here to skip the current record */
   385    385     int nPop          /* Number of times to pop stack when jumping */
   386    386   ){
   387    387     if( p->iOffset>=0 && iContinue!=0 ){
   388    388       int addr;
   389    389       sqlite3VdbeAddOp(v, OP_MemIncr, -1, p->iOffset);
   390         -    addr = sqlite3VdbeAddOp(v, OP_IfMemNeg, p->iOffset, addr);
          390  +    addr = sqlite3VdbeAddOp(v, OP_IfMemNeg, p->iOffset, 0);
   391    391       if( nPop>0 ){
   392    392         sqlite3VdbeAddOp(v, OP_Pop, nPop, 0);
   393    393       }
   394    394       sqlite3VdbeAddOp(v, OP_Goto, 0, iContinue);
   395    395       VdbeComment((v, "# skip OFFSET records"));
   396    396       sqlite3VdbeJumpHere(v, addr);
   397    397     }