From: drh Date: Mon, 8 Oct 2012 21:01:15 +0000 (+0000) Subject: All test cases (veryquick.tcl and min.rc) pass. A few branch operations in X-Git-Tag: version-3.7.15~84^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fqp-enhancements;p=thirdparty%2Fsqlite.git All test cases (veryquick.tcl and min.rc) pass. A few branch operations in ORDER BY optimization logic are untested by min.rc. FossilOrigin-Name: 8314fd6078a3a71aea9d6386ff277cfeb592b4ba --- diff --git a/manifest b/manifest index 60325045c0..763c801a91 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Further\stweaks\sto\sthe\sORDER\sBY\soptimizer,\sto\sfix\sa\sbug\sand\sto\sget\sthe\s\noptimizer\sto\srecognize\ssome\sadditional\scases. -D 2012-10-08T20:27:35.617 +C All\stest\scases\s(veryquick.tcl\sand\smin.rc)\spass.\s\sA\sfew\sbranch\soperations\sin\nORDER\sBY\soptimization\slogic\sare\suntested\sby\smin.rc. +D 2012-10-08T21:01:15.797 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 6bc65388a642277ede4449bf852ef09f630997e8 +F src/where.c b74866c4c15f0971a997e194699837815e5e628d F test/8_3_names.test 631ea964a3edb091cf73c3b540f6bcfdb36ce823 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggnested.test 0be144b453e0622a085fae8665c32f5676708e00 @@ -634,7 +634,7 @@ F test/notify3.test a86259abbfb923aa27d30f0fc038c88e5251488a F test/notnull.test cc7c78340328e6112a13c3e311a9ab3127114347 F test/null.test a8b09b8ed87852742343b33441a9240022108993 F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394 -F test/orderby1.test 4875a2a0a87d81920f3600a3405dc42f233b8c82 +F test/orderby1.test ef4f7c40df81b9a4303a718433d34052f07db47d F test/orderby2.test bc11009f7cd99d96b1b11e57b199b00633eb5b04 F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3 F test/pager1.test 2163c6ef119f497a71a84137c957c63763e640ab @@ -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 301bbee4045aa169e29fb4fb75743b71eb4760a1 -R efd94f360278497c63522273f6fc0188 +P bcb4f262476193cfb17818d8c62bab528dddeef9 +R 530e49166e8d0f53a60bc95ac28c268f U drh -Z e6fe7146356897869a54564ecea90f21 +Z efffd1a95fdeb1f2abbf95a65e64a523 diff --git a/manifest.uuid b/manifest.uuid index 2a7390063c..b7ef933b27 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bcb4f262476193cfb17818d8c62bab528dddeef9 \ No newline at end of file +8314fd6078a3a71aea9d6386ff277cfeb592b4ba \ No newline at end of file diff --git a/src/where.c b/src/where.c index 21b34a6175..4016e93d07 100644 --- a/src/where.c +++ b/src/where.c @@ -2920,7 +2920,7 @@ static int isSortingIndex( pRight->iTable, pRight->iColumn)); isEq = isOrderedColumn(p, pRight->iTable, pRight->iColumn); WHERETRACE((" -> isEq=%d\n", isEq)); - if( isEq>=2 && isEq!=pOBItem->sortOrder+2 ){ + if( isMatch && isEq>=2 && isEq!=pOBItem->sortOrder+2 ){ break; } }else{ diff --git a/test/orderby1.test b/test/orderby1.test index 8087857931..2001e34009 100644 --- a/test/orderby1.test +++ b/test/orderby1.test @@ -114,7 +114,7 @@ do_test 1.4c { EXPLAIN QUERY PLAN SELECT name FROM album JOIN track USING (aid) ORDER BY title DESC, tn } -} {/ORDER BY/} ;# separate sorting pass due to mixed DESC/ASC +} {~/ORDER BY/} ;# optimized out do_test 1.5a { @@ -132,7 +132,7 @@ do_test 1.5c { EXPLAIN QUERY PLAN SELECT name FROM album JOIN track USING (aid) ORDER BY title, tn DESC } -} {/ORDER BY/} ;# separate sorting pass due to mixed DESC/ASC +} {~/ORDER BY/} ;# optimized out do_test 1.6a { db eval { @@ -261,7 +261,7 @@ do_test 2.4c { EXPLAIN QUERY PLAN SELECT name FROM album JOIN track USING (aid) ORDER BY title DESC, tn } -} {/ORDER BY/} ;# separate sorting pass due to mixed DESC/ASC +} {~/ORDER BY/} ;# optimized out do_test 2.5a { @@ -279,7 +279,7 @@ do_test 2.5c { EXPLAIN QUERY PLAN SELECT name FROM album JOIN track USING (aid) ORDER BY title, tn DESC } -} {/ORDER BY/} ;# separate sorting pass due to mixed ASC/DESC +} {~/ORDER BY/} ;# optimized out do_test 2.6a { db eval { @@ -396,7 +396,7 @@ do_test 3.4c { EXPLAIN QUERY PLAN SELECT name FROM album JOIN track USING (aid) ORDER BY title, tn } -} {/ORDER BY/} ;# separate sorting pass due to mismatched DESC/ASC +} {~/ORDER BY/} ;# optimized out do_test 3.5a { @@ -414,7 +414,7 @@ do_test 3.5c { EXPLAIN QUERY PLAN SELECT name FROM album JOIN track USING (aid) ORDER BY title DESC, tn DESC } -} {/ORDER BY/} ;# separate sorting pass due to mismatched ASC/DESC +} {~/ORDER BY/} ;# optimzed out do_test 3.6a {