SQLite

Check-in [b95e6933]
Login

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

Overview
Comment:Fix an error in the OP_SeekScan opcode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.41
Files: files | file ages | folders
SHA3-256: b95e69330eca0f4561a5a448c43643a83329db1daa48b568b69d0fdb55bbc9ec
User & Date: drh 2023-03-24 21:27:37
Context
2023-03-24
22:24
Remove undocumented, vestigial SQL functions in the CLI that were once used for the ".recover" command but are now no longer needed. This is a fix for the problem described by forum post be9c294ee0. (check-in: 74d14900 user: drh tags: branch-3.41)
21:27
Fix an error in the OP_SeekScan opcode. (check-in: b95e6933 user: drh tags: branch-3.41)
21:24
Fix an error in the OP_SeekScan opcode added by check-in [4a43430fd23f8835]. Problem reported by forum post 8cc1dc0fe9. (check-in: 651a13fc user: drh tags: trunk)
20:41
Increase the version number to 3.41.3. (check-in: 9a19c6ce user: drh tags: branch-3.41)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

4961
4962
4963
4964
4965
4966
4967

4968
4969
4970
4971
4972
4973
4974
        printf("... fall through after %d steps\n", pOp->p1);
      }        
#endif
      VdbeBranchTaken(0,3);
      break;
    }
    nStep--;

    rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
    if( rc ){
      if( rc==SQLITE_DONE ){
        rc = SQLITE_OK;
        goto seekscan_search_fail;
      }else{
        goto abort_due_to_error;







>







4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
        printf("... fall through after %d steps\n", pOp->p1);
      }        
#endif
      VdbeBranchTaken(0,3);
      break;
    }
    nStep--;
    pC->cacheStatus = CACHE_STALE;
    rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
    if( rc ){
      if( rc==SQLITE_DONE ){
        rc = SQLITE_OK;
        goto seekscan_search_fail;
      }else{
        goto abort_due_to_error;

Changes to test/skipscan1.test.

414
415
416
417
418
419
420










421
422
    FROM t1
   WHERE a = b
     AND a = 3
     AND b IN (1,3,2,4)
     AND b >= 0
     AND a <= 10;
} {3}











finish_test







>
>
>
>
>
>
>
>
>
>


414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
    FROM t1
   WHERE a = b
     AND a = 3
     AND b IN (1,3,2,4)
     AND b >= 0
     AND a <= 10;
} {3}

# 2023-03-24 https://sqlite.org/forum/forumpost/8cc1dc0fe9
#
reset_db
do_execsql_test skipscan1-5.0 {
  CREATE TABLE t1(a TEXT, UNIQUE(a,a,a));
  INSERT INTO t1 VALUES (hex(zeroblob(241))),(1),(2),(3);
  ANALYZE;
  SELECT max(a) FROM t1 WHERE a IN t1;
} {3}

finish_test