/ Check-in [55ff4291]
Login

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

Overview
Comment:Remove some code that is commented out.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | like-opt-fix
Files: files | file ages | folders
SHA1: 55ff429177acfdab056a16a67361a5381115c6c7
User & Date: drh 2015-03-07 03:02:38
Context
2015-03-07
12:58
New test cases for LIKE and GLOB with BLOB left-hand side values. Closed-Leaf check-in: 50fa3c5f user: drh tags: like-opt-fix
03:02
Remove some code that is commented out. check-in: 55ff4291 user: drh tags: like-opt-fix
02:51
Fix problems with reverse order sorting and indexes in the LIKE optimization. check-in: 564b8fe7 user: drh tags: like-opt-fix
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/where.c.

3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
    ** start and end terms (pRangeStart and pRangeEnd).
    */
    if( (nEq<pIdx->nKeyCol && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC))
     || (bRev && pIdx->nKeyCol==nEq)
    ){
      SWAP(WhereTerm *, pRangeEnd, pRangeStart);
      SWAP(u8, bSeekPastNull, bStopAtNull);
#if 0
      if( pLevel->addrLikeRep ){
        sqlite3VdbeChangeP1(v, pLevel->addrLikeRep-1, 1);
      }
#endif
    }

    testcase( pRangeStart && (pRangeStart->eOperator & WO_LE)!=0 );
    testcase( pRangeStart && (pRangeStart->eOperator & WO_GE)!=0 );
    testcase( pRangeEnd && (pRangeEnd->eOperator & WO_LE)!=0 );
    testcase( pRangeEnd && (pRangeEnd->eOperator & WO_GE)!=0 );
    startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);







<
<
<
<
<







3401
3402
3403
3404
3405
3406
3407





3408
3409
3410
3411
3412
3413
3414
    ** start and end terms (pRangeStart and pRangeEnd).
    */
    if( (nEq<pIdx->nKeyCol && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC))
     || (bRev && pIdx->nKeyCol==nEq)
    ){
      SWAP(WhereTerm *, pRangeEnd, pRangeStart);
      SWAP(u8, bSeekPastNull, bStopAtNull);





    }

    testcase( pRangeStart && (pRangeStart->eOperator & WO_LE)!=0 );
    testcase( pRangeStart && (pRangeStart->eOperator & WO_GE)!=0 );
    testcase( pRangeEnd && (pRangeEnd->eOperator & WO_LE)!=0 );
    testcase( pRangeEnd && (pRangeEnd->eOperator & WO_GE)!=0 );
    startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);