mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Try to factor constant subcomponents of the WHERE clause out of the loop.
FossilOrigin-Name: 9d05777fe24e1a5ce71762de38db840931ef0bc8
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Avoid\sunnecessary\saffinity\stransformations\swhen\sbuilding\sindices\susing\ndata\sfrom\sa\stable.
|
C Try\sto\sfactor\sconstant\ssubcomponents\sof\sthe\sWHERE\sclause\sout\sof\sthe\sloop.
|
||||||
D 2014-01-02T19:35:30.181
|
D 2014-01-02T21:05:10.654
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
|
F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -293,7 +293,7 @@ F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
|
|||||||
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
|
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
|
||||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||||
F src/walker.c e9e593d5bb798c3e67fc3893dfe7055c9e7d8d74
|
F src/walker.c e9e593d5bb798c3e67fc3893dfe7055c9e7d8d74
|
||||||
F src/where.c 60bc8c5b00e2292c24a42455d022eeeda33a16f1
|
F src/where.c 8e3cb2030eaa242defb804aa30115b5d870e5cd4
|
||||||
F src/whereInt.h 96a75c61f1d2b9d4a8e4bb17d89deb0cf7cba358
|
F src/whereInt.h 96a75c61f1d2b9d4a8e4bb17d89deb0cf7cba358
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||||
@@ -1147,7 +1147,7 @@ F tool/vdbe-compress.tcl 0cf56e9263a152b84da86e75a5c0cdcdb7a47891
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
||||||
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
||||||
P b7e39851a75b87ebca747b26a39989560fd6362b
|
P 10d851353c2abeadbd2852c210a7ff9f7f513e5d
|
||||||
R 8c4d4f58f19d587102e868c570c261da
|
R c2b1a12fe347b39aeab4feaef9309c2b
|
||||||
U drh
|
U drh
|
||||||
Z 387b8179fd8db58dae028273b1bc8ad7
|
Z c170c664d17a9fc9f22716e0d87d4dc7
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
10d851353c2abeadbd2852c210a7ff9f7f513e5d
|
9d05777fe24e1a5ce71762de38db840931ef0bc8
|
||||||
@@ -5430,9 +5430,12 @@ WhereInfo *sqlite3WhereBegin(
|
|||||||
/* Special case: a WHERE clause that is constant. Evaluate the
|
/* Special case: a WHERE clause that is constant. Evaluate the
|
||||||
** expression and either jump over all of the code or fall thru.
|
** expression and either jump over all of the code or fall thru.
|
||||||
*/
|
*/
|
||||||
if( pWhere && (nTabList==0 || sqlite3ExprIsConstantNotJoin(pWhere)) ){
|
for(ii=0; ii<sWLB.pWC->nTerm; ii++){
|
||||||
sqlite3ExprIfFalse(pParse, pWhere, pWInfo->iBreak, SQLITE_JUMPIFNULL);
|
if( nTabList==0 || sqlite3ExprIsConstantNotJoin(sWLB.pWC->a[ii].pExpr) ){
|
||||||
pWhere = 0;
|
sqlite3ExprIfFalse(pParse, sWLB.pWC->a[ii].pExpr, pWInfo->iBreak,
|
||||||
|
SQLITE_JUMPIFNULL);
|
||||||
|
sWLB.pWC->a[ii].wtFlags |= TERM_CODED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special case: No FROM clause
|
/* Special case: No FROM clause
|
||||||
|
|||||||
Reference in New Issue
Block a user