From: drh Date: Wed, 2 Sep 2015 16:51:37 +0000 (+0000) Subject: Small simplification to the EXPLAIN QUERY PLAN logic. X-Git-Tag: version-3.9.0~165 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ed0d809a6c9cdd71e580be6805efedd5632bd97;p=thirdparty%2Fsqlite.git Small simplification to the EXPLAIN QUERY PLAN logic. FossilOrigin-Name: d1592d201afea20cb2ca94fe2bf5ae031bd29ede --- diff --git a/manifest b/manifest index f7cce1b307..67042b09db 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Use\ssqlite3XPrintf()\sinstead\sof\ssqlite3StrAccumAppend()\sin\sa\sfew\splaces\nfor\sbetter\sperformance\sand\sa\ssmaller\sfootprint. -D 2015-09-02T15:37:50.515 +C Small\ssimplification\sto\sthe\sEXPLAIN\sQUERY\sPLAN\slogic. +D 2015-09-02T16:51:37.514 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -416,7 +416,7 @@ F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4 F src/walker.c 2e14d17f592d176b6dc879c33fbdec4fbccaa2ba F src/where.c 91e73ffc699c140a59baa03a6b7b060db02bed81 F src/whereInt.h 901c17c1e3c82745ad9b85b4471543fa59c980e9 -F src/wherecode.c f749795d059a71dd7b33af1b11bf65a30d085233 +F src/wherecode.c 713306be19c2621aee3c7f7d8ed20e699b16069b F src/whereexpr.c 1a308d1ee5144890d21ea9cf70d49bc96a83432b F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2 F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd @@ -1380,7 +1380,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 5d3f5df4da9f40d5897b5c23b2ea9333fc18ac2c -R 015478dce7d3b6dcb9b04185a9d6060b +P 82355e41084387fa11b7b531e4d660dd3b4cd984 +R 24d6bc28c6b4612282a7c50341fa4c3b U drh -Z 3e1b692f08d8bff51066d541f96997b7 +Z 2e9b16d5ccccceea14352a27b62cdb47 diff --git a/manifest.uuid b/manifest.uuid index 7aad3d15ce..14752ac8fe 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -82355e41084387fa11b7b531e4d660dd3b4cd984 \ No newline at end of file +d1592d201afea20cb2ca94fe2bf5ae031bd29ede \ No newline at end of file diff --git a/src/wherecode.c b/src/wherecode.c index 99ebfe1d4f..96dc72e30d 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -67,12 +67,8 @@ static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop, Table *pTab){ sqlite3StrAccumAppend(pStr, " (", 2); for(i=0; i=nSkip ){ - explainAppendTerm(pStr, i, z, "="); - }else{ - if( i ) sqlite3StrAccumAppend(pStr, " AND ", 5); - sqlite3XPrintf(pStr, 0, "ANY(%s)", z); - } + if( i ) sqlite3StrAccumAppend(pStr, " AND ", 5); + sqlite3XPrintf(pStr, 0, i>=nSkip ? "%s=?" : "ANY(%s)", z); } j = i;