]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Simplification to the logic that prevents automatic indexes from being formed
authordrh <drh@noemail.net>
Tue, 17 Jun 2014 09:52:26 +0000 (09:52 +0000)
committerdrh <drh@noemail.net>
Tue, 17 Jun 2014 09:52:26 +0000 (09:52 +0000)
on constant expressions.

FossilOrigin-Name: 36d67e1dd2b4f4c22d02f3c3b8d372074de5523a

manifest
manifest.uuid
src/where.c

index 253d4bcb8679cee09369d3bb07b4c44a9bad291b..17c12ccb2dbf6ba96a16de04a9e88d90fafc7efe 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Allow\san\sautomatic\sindex\son\sa\sWHERE\sconstraint\swhere\sthe\sRHS\sis\sdoes\snot\nreference\sanother\stable\sas\slong\sas\sthe\sRHS\sis\snot\sa\sconstant.
-D 2014-06-17T09:00:54.229
+C Simplification\sto\sthe\slogic\sthat\sprevents\sautomatic\sindexes\sfrom\sbeing\sformed\non\sconstant\sexpressions.
+D 2014-06-17T09:52:26.975
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in ed5e4aae4799f724699d5509fac2977786414dbb
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -296,7 +296,7 @@ F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
 F src/wal.c 264df50a1b33124130b23180ded2e2c5663c652a
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
-F src/where.c d6a284abd9a1b4c1e617e5208e695cd6f0616ae1
+F src/where.c 3214e390ca5ff0b19fb5084e5bd5870da623389d
 F src/whereInt.h 929c1349b5355fd44f22cee5c14d72b3329c58a6
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1177,7 +1177,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P d6883e960f61365729f279a3c1f2c050beb49a55
-R e7b366f668336ead2394408b5846caa4
+P 58acc2a8b38c5f13175c191697b4d2b663db1872
+R 91ed31168e6ce0a5afee4b984323de5e
 U drh
-Z ded0b7f99669cd2fc0f45c3d542cb907
+Z ee443673993fc3ea86368d30ccfb6dad
index df61c8be5ba7899d595e90119f6045cc2ec427f2..385f247806d85c38a05319dc622eaca533c8765e 100644 (file)
@@ -1 +1 @@
-58acc2a8b38c5f13175c191697b4d2b663db1872
\ No newline at end of file
+36d67e1dd2b4f4c22d02f3c3b8d372074de5523a
\ No newline at end of file
index 8550231c30154f805b9356bf296fe32f277ea217..1caaf73df7b0b21a96d06a8982ae64c29252821f 100644 (file)
@@ -4529,10 +4529,7 @@ static int whereLoopAddBtree(
     WhereTerm *pWCEnd = pWC->a + pWC->nTerm;
     for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){
       if( pTerm->prereqRight & pNew->maskSelf ) continue;
-      if( pTerm->prereqRight==0
-       && sqlite3ExprIsConstant(pTerm->pExpr->pRight) ){
-        continue;
-      }
+      if( sqlite3ExprIsConstant(pTerm->pExpr->pRight) ) continue;
       if( termCanDriveIndex(pTerm, pSrc, 0) ){
         pNew->u.btree.nEq = 1;
         pNew->u.btree.nSkip = 0;