/ 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 Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
....
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.800 2008/12/11 19:50:19 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor
................................................................................
  }
  incrV = pOp->p3 ?1:0;
  if( pIn1->flags & MEM_Int ){
    v = pIn1->u.i;
  }else{
    assert( pIn1->flags & MEM_Real );
    v = (sqlite3_int64)pIn1->r;
    if( pIn1->r>(double)v ){
      incrV = 1;
    }
  }
  if( incrV ){
    if( v==LARGEST_INT64 ){
      pc = pOp->p2 - 1;
      break;
    }
    v++;







|







 







|
<
<







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
....
1462
1463
1464
1465
1466
1467
1468
1469


1470
1471
1472
1473
1474
1475
1476
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.801 2008/12/11 20:03:22 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor
................................................................................
  }
  incrV = pOp->p3 ?1:0;
  if( pIn1->flags & MEM_Int ){
    v = pIn1->u.i;
  }else{
    assert( pIn1->flags & MEM_Real );
    v = (sqlite3_int64)pIn1->r;
    incrV = pIn1->r>(double)v ?1:0;


  }
  if( incrV ){
    if( v==LARGEST_INT64 ){
      pc = pOp->p2 - 1;
      break;
    }
    v++;