/ 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 Unified Diffs Ignore Whitespace Patch

Changes to src/where.c.

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







|







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