/ Check-in [f6c50f35]
Login

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

Overview
Comment:Previous change to the OP_ForceInt opcode did not work correctly when the input is a negative floating point value. This change is the fix. Ticket #3536. (CVS 6023)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f6c50f357c302907a5398c551a5c596f7d305031
User & Date: drh 2008-12-11 20:03:22
Context
2008-12-12
17:56
Rework the rowid lookup logic in the query optimizer to fix various boundary value problems. Ticket #3536. Renamed the OP_MoveXX opcodes to OP_SeekXX. (CVS 6024) check-in: e545490a user: drh tags: trunk
2008-12-11
20:03
Previous change to the OP_ForceInt opcode did not work correctly when the input is a negative floating point value. This change is the fix. Ticket #3536. (CVS 6023) check-in: f6c50f35 user: drh tags: trunk
19:50
Make sure the OP_ForceInt vdbe opcode does not cause a rowid overflow. Ticket #3536. Tests to verify this change will be checked in separately. (CVS 6022) check-in: 6a049c65 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.800 2008/12/11 19:50:19 drh Exp $
           46  +** $Id: vdbe.c,v 1.801 2008/12/11 20:03:22 drh Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include <ctype.h>
    50     50   #include "vdbeInt.h"
    51     51   
    52     52   /*
    53     53   ** The following global variable is incremented every time a cursor
................................................................................
  1462   1462     }
  1463   1463     incrV = pOp->p3 ?1:0;
  1464   1464     if( pIn1->flags & MEM_Int ){
  1465   1465       v = pIn1->u.i;
  1466   1466     }else{
  1467   1467       assert( pIn1->flags & MEM_Real );
  1468   1468       v = (sqlite3_int64)pIn1->r;
  1469         -    if( pIn1->r>(double)v ){
  1470         -      incrV = 1;
  1471         -    }
         1469  +    incrV = pIn1->r>(double)v ?1:0;
  1472   1470     }
  1473   1471     if( incrV ){
  1474   1472       if( v==LARGEST_INT64 ){
  1475   1473         pc = pOp->p2 - 1;
  1476   1474         break;
  1477   1475       }
  1478   1476       v++;