From: drh Date: Tue, 2 Oct 2012 01:46:48 +0000 (+0000) Subject: Factor an invariant out the loop termination condition for the ORDER BY X-Git-Tag: version-3.7.15~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3be57d2abadd1507a9114eb920916a319c069715;p=thirdparty%2Fsqlite.git Factor an invariant out the loop termination condition for the ORDER BY satisfied-by-index analyzer routine. FossilOrigin-Name: 545bb33688663066cf3f09e4cdc4d5cfe59fb8db --- diff --git a/manifest b/manifest index f2a8ebb39a..0d1e3cf201 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\ssure\sthe\souter\sloop\scursor\snumbers\sare\srecorded\sin\stime\sfor\sthem\sto\sbe\nused\sby\sthe\sORDER\sBY\soptimizer. -D 2012-10-02T01:25:16.426 +C Factor\san\sinvariant\sout\sthe\sloop\stermination\scondition\sfor\sthe\sORDER\sBY\nsatisfied-by-index\sanalyzer\sroutine. +D 2012-10-02T01:46:48.203 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5f4f26109f9d80829122e0e09f9cda008fa065fb F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -249,7 +249,7 @@ F src/vtab.c d8020c0a0e8ccc490ca449d7e665311b6e9f3ba9 F src/wal.c e1fe8f92a0ea0fef8faa87ec43a127a478589d22 F src/wal.h 29c197540b19044e6cd73487017e5e47a1d3dac6 F src/walker.c 3d75ba73de15e0f8cd0737643badbeb0e002f07b -F src/where.c 0a309f52e9ca5e77250a242c2f0527754e3e30c4 +F src/where.c 58a99bf57e1e216210fa143f3ae3cd1a5928a36f F test/8_3_names.test 631ea964a3edb091cf73c3b540f6bcfdb36ce823 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggnested.test 0be144b453e0622a085fae8665c32f5676708e00 @@ -1018,7 +1018,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9 -P 76b277655646a9fe0f336ff106157f1efcd32019 -R 8e3740840a007142381cf2f0396df8e5 +P 351dc8d9cab8a222f28fb865d3a7d1c622d60d6f +R e2343532e1485c60fb209fa3ba6a8cc6 U drh -Z 2be46057d17778455d3bb7f9393d3220 +Z 8f9278868782471bac046c34faf9fbb1 diff --git a/manifest.uuid b/manifest.uuid index 53d466cfe9..bd7521b1fc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -351dc8d9cab8a222f28fb865d3a7d1c622d60d6f \ No newline at end of file +545bb33688663066cf3f09e4cdc4d5cfe59fb8db \ No newline at end of file diff --git a/src/where.c b/src/where.c index 739222338e..77f9fb2b7c 100644 --- a/src/where.c +++ b/src/where.c @@ -2859,7 +2859,7 @@ static int isSortingIndex( ** of the index is also allowed to match against the ORDER BY ** clause. */ - for(i=0,j=nPriorSat,pTerm=&pOrderBy->a[j]; jnColumn; i++){ + for(i=0,j=nPriorSat,pTerm=&pOrderBy->a[j]; jnColumn ); pExpr = pTerm->pExpr; if( pExpr->op!=TK_COLUMN || pExpr->iTable!=base ){ /* Can not use an index sort on anything that is not a column in the