mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Simplification to the logic that prevents automatic indexes from being formed
on constant expressions. FossilOrigin-Name: 36d67e1dd2b4f4c22d02f3c3b8d372074de5523a
This commit is contained in:
12
manifest
12
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.
|
C Simplification\sto\sthe\slogic\sthat\sprevents\sautomatic\sindexes\sfrom\sbeing\sformed\non\sconstant\sexpressions.
|
||||||
D 2014-06-17T09:00:54.229
|
D 2014-06-17T09:52:26.975
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in ed5e4aae4799f724699d5509fac2977786414dbb
|
F Makefile.in ed5e4aae4799f724699d5509fac2977786414dbb
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -296,7 +296,7 @@ F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
|
|||||||
F src/wal.c 264df50a1b33124130b23180ded2e2c5663c652a
|
F src/wal.c 264df50a1b33124130b23180ded2e2c5663c652a
|
||||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||||
F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
|
F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
|
||||||
F src/where.c d6a284abd9a1b4c1e617e5208e695cd6f0616ae1
|
F src/where.c 3214e390ca5ff0b19fb5084e5bd5870da623389d
|
||||||
F src/whereInt.h 929c1349b5355fd44f22cee5c14d72b3329c58a6
|
F src/whereInt.h 929c1349b5355fd44f22cee5c14d72b3329c58a6
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||||
@@ -1177,7 +1177,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P d6883e960f61365729f279a3c1f2c050beb49a55
|
P 58acc2a8b38c5f13175c191697b4d2b663db1872
|
||||||
R e7b366f668336ead2394408b5846caa4
|
R 91ed31168e6ce0a5afee4b984323de5e
|
||||||
U drh
|
U drh
|
||||||
Z ded0b7f99669cd2fc0f45c3d542cb907
|
Z ee443673993fc3ea86368d30ccfb6dad
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
58acc2a8b38c5f13175c191697b4d2b663db1872
|
36d67e1dd2b4f4c22d02f3c3b8d372074de5523a
|
||||||
@@ -4529,10 +4529,7 @@ static int whereLoopAddBtree(
|
|||||||
WhereTerm *pWCEnd = pWC->a + pWC->nTerm;
|
WhereTerm *pWCEnd = pWC->a + pWC->nTerm;
|
||||||
for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){
|
for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){
|
||||||
if( pTerm->prereqRight & pNew->maskSelf ) continue;
|
if( pTerm->prereqRight & pNew->maskSelf ) continue;
|
||||||
if( pTerm->prereqRight==0
|
if( sqlite3ExprIsConstant(pTerm->pExpr->pRight) ) continue;
|
||||||
&& sqlite3ExprIsConstant(pTerm->pExpr->pRight) ){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if( termCanDriveIndex(pTerm, pSrc, 0) ){
|
if( termCanDriveIndex(pTerm, pSrc, 0) ){
|
||||||
pNew->u.btree.nEq = 1;
|
pNew->u.btree.nEq = 1;
|
||||||
pNew->u.btree.nSkip = 0;
|
pNew->u.btree.nSkip = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user