/ Check-in [841cf7a7]
Login

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

Overview
Comment:Remove an over-zealous call to memAboutToChange() from OP_MustBeInt. OP_MustBeInt will never invalidate the Mem.z pointer so the memAboutToChange() call is not necessary.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 841cf7a7dbf0947cb7bde864609a8d3294f78689
User & Date: drh 2010-12-03 18:57:18
Context
2010-12-04
18:20
Fix a memory leak in fts3 that can occur in an OOM condition. check-in: 507027b7 user: dan tags: trunk
2010-12-03
18:57
Remove an over-zealous call to memAboutToChange() from OP_MustBeInt. OP_MustBeInt will never invalidate the Mem.z pointer so the memAboutToChange() call is not necessary. check-in: 841cf7a7 user: drh tags: trunk
15:41
Version 3.7.4 release candidate 1 check-in: 2e800cb8 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
** Force the value in register P1 to be an integer.  If the value
** in P1 is not an integer and cannot be converted into an integer
** without data loss, then jump immediately to P2, or if P2==0
** raise an SQLITE_MISMATCH exception.
*/
case OP_MustBeInt: {            /* jump, in1 */
  pIn1 = &aMem[pOp->p1];
  memAboutToChange(p, pIn1);
  applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
  if( (pIn1->flags & MEM_Int)==0 ){
    if( pOp->p2==0 ){
      rc = SQLITE_MISMATCH;
      goto abort_due_to_error;
    }else{
      pc = pOp->p2 - 1;







<







1510
1511
1512
1513
1514
1515
1516

1517
1518
1519
1520
1521
1522
1523
** Force the value in register P1 to be an integer.  If the value
** in P1 is not an integer and cannot be converted into an integer
** without data loss, then jump immediately to P2, or if P2==0
** raise an SQLITE_MISMATCH exception.
*/
case OP_MustBeInt: {            /* jump, in1 */
  pIn1 = &aMem[pOp->p1];

  applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
  if( (pIn1->flags & MEM_Int)==0 ){
    if( pOp->p2==0 ){
      rc = SQLITE_MISMATCH;
      goto abort_due_to_error;
    }else{
      pc = pOp->p2 - 1;