Clarify the computation of compatible isOrdered by in the plan solver of

the query planner.

FossilOrigin-Name: b5e8fd575a80334160de0aac8084ed5cd28816a5
This commit is contained in:
drh 2014-08-07 20:37:01 +00:00
parent b28ce65f45
commit f2a90306ca
3 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -1 +1 @@
8f04d2c0084afa6381e78847c9aa296498d448cb
b5e8fd575a80334160de0aac8084ed5cd28816a5

View 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;