/ Changes On Branch like-compare-opt
Login

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

Changes In Branch like-compare-opt Excluding Merge-Ins

This is equivalent to a diff from 457eedfac0 to 4d336d7420

2017-10-30
18:49
Improve the performance of the LIKE operator by using strcspn() to aid wildcard matching. check-in: 37284d4e8f user: drh tags: trunk
18:26
Speed up wildcard searches in LIKE using strchr() Closed-Leaf check-in: 4d336d7420 user: drh tags: like-compare-opt
2017-10-28
20:54
Increase the version number for the next release - which is still months away but there have been significant query planner enhancements since the previous release. check-in: 457eedfac0 user: drh tags: trunk
20:51
Reactivate query flattening when the result set of the outer query has no function calls or subqueries. This is a partial reversal of check-in [c9104b59]. Co-routines are still preferred if the outer query has a complex result set, but for simple results sets, query flattening is used. Check-in [4464f40ccd7] is completely backed out due to this change. check-in: d17ef7d153 user: drh tags: trunk

Changes to src/func.c.

702
703
704
705
706
707
708












709
710
711
712
713

714
715
716
717
718
719
720
        int bMatch;
        if( noCase ){
          cx = sqlite3Toupper(c);
          c = sqlite3Tolower(c);
        }else{
          cx = c;
        }












        while( (c2 = *(zString++))!=0 ){
          if( c2!=c && c2!=cx ) continue;
          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
          if( bMatch!=SQLITE_NOMATCH ) return bMatch;
        }

      }else{
        int bMatch;
        while( (c2 = Utf8Read(zString))!=0 ){
          if( c2!=c ) continue;
          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
          if( bMatch!=SQLITE_NOMATCH ) return bMatch;
        }







>
>
>
>
>
>
>
>
>
>
>
>





>







702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
        int bMatch;
        if( noCase ){
          cx = sqlite3Toupper(c);
          c = sqlite3Tolower(c);
        }else{
          cx = c;
        }
        while(1){
          const u8 *zStr1 = (const u8*)strchr((const char*)zString,c);
          if( cx!=c ){
            const u8 *zStr2 = (const u8*)strchr((const char*)zString,cx);
            if( zStr1==0 || (zStr2!=0 && zStr2<zStr1) ) zStr1 = zStr2;
          }
          if( zStr1==0 ) break;
          zString = &zStr1[1];
          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
          if( bMatch!=SQLITE_NOMATCH ) return bMatch;
        }
#if 0
        while( (c2 = *(zString++))!=0 ){
          if( c2!=c && c2!=cx ) continue;
          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
          if( bMatch!=SQLITE_NOMATCH ) return bMatch;
        }
#endif
      }else{
        int bMatch;
        while( (c2 = Utf8Read(zString))!=0 ){
          if( c2!=c ) continue;
          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
          if( bMatch!=SQLITE_NOMATCH ) return bMatch;
        }