]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Proposed fix for a problem in the query planner.
authordrh <drh@noemail.net>
Tue, 28 Jun 2016 22:27:56 +0000 (22:27 +0000)
committerdrh <drh@noemail.net>
Tue, 28 Jun 2016 22:27:56 +0000 (22:27 +0000)
FossilOrigin-Name: a33d23560959a127e37d8213dc00210cd4b05352

manifest
manifest.uuid
src/whereexpr.c

index 2dd253cf309ad9e7dac3e84c4e38a4385a81da3a..2e46c5cb6ab1cb8431fe7d9c1d219fb8b3485958 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Prevent\sthe\sWhereLoop.rSetup\scost\sestimate\sfrom\sgoing\snegative\son\scomplex\nqueries.
-D 2016-06-26T04:06:28.081
+C Proposed\sfix\sfor\sa\sproblem\sin\sthe\squery\splanner.
+D 2016-06-28T22:27:56.883
 F Makefile.in bc2b4864a23a4a21c3e26d7b4350f51bab324d45
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 50149765ef72f4e652b9a0f1f6462c4784bb9423
@@ -465,7 +465,7 @@ F src/walker.c 0f142b5bd3ed2041fc52d773880748b212e63354
 F src/where.c 48eed8ebe319c6cbc7bf7682018f32af0f5189f5
 F src/whereInt.h e5b939701a7ceffc5a3a8188a37f9746416ebcd0
 F src/wherecode.c e20cb381ff621e56a4684c71e31999aca2547ca6
-F src/whereexpr.c c32d47085dbaca0b8fd013210f56693c7d220d48
+F src/whereexpr.c d7dcbf14ce1b5876c1f76496162c30fcba669563
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1502,7 +1502,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 507014e4c7a70cd09410c89c8ed466c8edab39d2
-R ae55d782914cbf2db58c75f82f862316
+P f81050859170c8708a1b296da8dd3ef0dd314a11
+R dcdb165f171e6961986899e464931036
+T *branch * planner-fix
+T *sym-planner-fix *
+T -sym-trunk *
 U drh
-Z e21bca843071316b56d3c29d5bf9cc08
+Z 35245dfa6950894f0d3652717f7690e0
index ee49eb40ac05237c587fdfc17b4dbc2242b7eab8..f6e2e672d10f6c027b41336bce4e8736e6d41d19 100644 (file)
@@ -1 +1 @@
-f81050859170c8708a1b296da8dd3ef0dd314a11
\ No newline at end of file
+a33d23560959a127e37d8213dc00210cd4b05352
\ No newline at end of file
index 90c4c45965ddd06ca21f46d17aa0a83064b152c6..1cb6be845854bb560621e7853a9a8735b86dea5d 100644 (file)
@@ -785,12 +785,10 @@ static int termIsEquivalence(Parse *pParse, Expr *pExpr){
   pColl = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight);
   if( pColl==0 || sqlite3StrICmp(pColl->zName, "BINARY")==0 ) return 1;
   pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
-  /* Since pLeft and pRight are both a column references, their collating
-  ** sequence should always be defined. */
-  zColl1 = ALWAYS(pColl) ? pColl->zName : 0;
+  zColl1 = pColl ? pColl->zName : 0;
   pColl = sqlite3ExprCollSeq(pParse, pExpr->pRight);
-  zColl2 = ALWAYS(pColl) ? pColl->zName : 0;
-  return sqlite3StrICmp(zColl1, zColl2)==0;
+  zColl2 = pColl ? pColl->zName : 0;
+  return sqlite3_stricmp(zColl1, zColl2)==0;
 }
 
 /*