/ Check-in [faedaeac]
Login

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

Overview
Comment:Do not use a transitive constraint to an IN operator where the RHS is a constant if there exists a direct == operator to another table in an outer loop.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: faedaeace9c7ed9a8aaf96700caee09db0c0c061
User & Date: drh 2013-05-01 17:58:35
Context
2013-05-02
17:37
Minor fixes for compilation with SQLITE_OMIT_WAL defined. check-in: b81e87e7 user: dan tags: trunk
00:15
Begin inserting some experimental code for the next generation query planner. check-in: ccaf4c3f user: drh tags: nextgen-query-plan-exp
2013-05-01
19:49
Allocate 4 bytes of unused header space for an "Application ID". Add the "PRAGMA application_id" command to set and query this identifier. Add the "magic.txt" file to show how the posix file command might use this application id. check-in: 28c9e7fd user: drh tags: application-id
17:58
Do not use a transitive constraint to an IN operator where the RHS is a constant if there exists a direct == operator to another table in an outer loop. check-in: faedaeac user: drh tags: trunk
17:22
Avoid redundant constraint checking due to transitive constraints. check-in: 329478cb user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/where.c.

   701    701                 for(j=0; pIdx->aiColumn[j]!=iOrigCol; j++){
   702    702                   if( NEVER(j>=pIdx->nColumn) ) return 0;
   703    703                 }
   704    704                 if( sqlite3StrICmp(pColl->zName, pIdx->azColl[j]) ){
   705    705                   continue;
   706    706                 }
   707    707               }
   708         -            if( pTerm->prereqRight==0 ){
          708  +            if( pTerm->prereqRight==0 && (pTerm->eOperator&WO_EQ)!=0 ){
   709    709                 pResult = pTerm;
   710    710                 goto findTerm_success;
   711    711               }else if( pResult==0 ){
   712    712                 pResult = pTerm;
   713    713               }
   714    714             }
   715    715             if( (pTerm->eOperator & WO_EQUIV)!=0