]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Clarify the computation of compatible isOrdered by in the plan solver of
authordrh <drh@noemail.net>
Thu, 7 Aug 2014 20:37:01 +0000 (20:37 +0000)
committerdrh <drh@noemail.net>
Thu, 7 Aug 2014 20:37:01 +0000 (20:37 +0000)
the query planner.

FossilOrigin-Name: b5e8fd575a80334160de0aac8084ed5cd28816a5

manifest
manifest.uuid
src/where.c

index 833fa0e28433da3fc245ea4fa626c596e47f2548..a3788a8b47026f0dffd648bd24214fdbeef43003 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sthe\sextraneous\sdebugging\sprintf()\sfrom\sthe\sprevious\scheck-in.
-D 2014-08-07T20:25:37.284
+C Clarify\sthe\scomputation\sof\scompatible\sisOrdered\sby\sin\sthe\splan\ssolver\sof\nthe\squery\splanner.
+D 2014-08-07T20:37:01.008
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308
 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 5e4fe929798e75f9d5c6b5b9c545fbc006966c33
+F src/where.c 4cd4b3622caa81b71ebce8fea8f7811ae052d664
 F src/whereInt.h 929c1349b5355fd44f22cee5c14d72b3329c58a6
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1185,7 +1185,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 ec5d84ba69c100d9565425ed74040a49e410ea03
-R 85fb26fb0f7344228780016c4074b483
+P 8f04d2c0084afa6381e78847c9aa296498d448cb
+R 444666601d1d38c7f4902aa29891f8d2
 U drh
-Z 218dd74820a0f9854df8a36e666b7aca
+Z fa58944021488910925d31a2d03bf4a8
index 4e34981ca61cd31ccb8464d094c961f11f76f9c4..42afde34f7d2edcc3b53e19ea6f7ca661883fcc7 100644 (file)
@@ -1 +1 @@
-8f04d2c0084afa6381e78847c9aa296498d448cb
\ No newline at end of file
+b5e8fd575a80334160de0aac8084ed5cd28816a5
\ No newline at end of file
index ff50f52b45125f4b9f0207bc59c4358761658d4a..4dd6579e2f90790252dd453726ce9bb6d02d27cb 100644 (file)
@@ -5536,10 +5536,14 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
         ** First look for an existing path among best-so-far paths
         ** that covers the same set of loops and has the same isOrdered
         ** setting as the current path candidate.
+        **
+        ** The term "((pTo->isOrdered^isOrdered)&0x80)==0" is equivalent
+        ** to (pTo->isOrdered==(-1))==(isOrdered==(-1))" for the range
+        ** of legal values for isOrdered, -1..64.
         */
         for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){
           if( pTo->maskLoop==maskNew
-           && ((pTo->isOrdered^isOrdered)&80)==0
+           && ((pTo->isOrdered^isOrdered)&0x80)==0
           ){
             testcase( jj==nTo-1 );
             break;