]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Replace the magic number (-2) with its symbol XN_EXPR in the
authordrh <drh@noemail.net>
Fri, 19 Aug 2016 19:58:06 +0000 (19:58 +0000)
committerdrh <drh@noemail.net>
Fri, 19 Aug 2016 19:58:06 +0000 (19:58 +0000)
exprMightBeIndexed() routine.  No logic changes.

FossilOrigin-Name: d4a5af69cc3bde6f8c02075c07b4d47a0252392d

manifest
manifest.uuid
src/whereexpr.c

index 75bb629cc66b78c2fd8e51aa44e73d22ba1fad18..760f93473cab68c1e3785c2b305b2b59d7876967 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improved\scomments\son\ssqlite3CodeSubquery().\s\sNo\schanges\sto\scode.
-D 2016-08-19T19:12:58.298
+C Replace\sthe\smagic\snumber\s(-2)\swith\sits\ssymbol\sXN_EXPR\sin\sthe\nexprMightBeIndexed()\sroutine.\s\sNo\slogic\schanges.
+D 2016-08-19T19:58:06.626
 F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
@@ -467,7 +467,7 @@ F src/walker.c 2d2cc7fb0f320f7f415215d7247f3c584141ac09
 F src/where.c c7cdfd54f383090bb801cdd50d36de1a24684bb2
 F src/whereInt.h 14dd243e13b81cbb0a66063d38b70f93a7d6e613
 F src/wherecode.c f3fd16b9b4cef1345330d22cf3f1628f87a56456
-F src/whereexpr.c 8d9903d16ae45d15736745f7b75df2340c729782
+F src/whereexpr.c bb22074cc2712c5013ecacdf7d652e7568a47bc3
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1518,7 +1518,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 931c95358d8bc02f3e3d8ee4e545a07b2d2c97e8
-R 041e4a08027e633fe8c3ceee8cf4a385
+P acea4ee136def4815d22eec240c5903a72bde9bd
+R 223c403e8b392fa16a54efbf6c58e1ba
 U drh
-Z b93c8a041c20867db97a84e58d7255a6
+Z b5c0cabb5688d369770dffa65d09a7da
index 715e015f26fbc93a5a6d125d040e8d22ecb122dc..95b5affc2d0a1dc83ec4d7c1d3c069087467a14c 100644 (file)
@@ -1 +1 @@
-acea4ee136def4815d22eec240c5903a72bde9bd
\ No newline at end of file
+d4a5af69cc3bde6f8c02075c07b4d47a0252392d
\ No newline at end of file
index 23efed976191ba452a57d312610b95915d8a43d7..2fc903ce6efe7febee8cc764925c70956beaffa0 100644 (file)
@@ -823,7 +823,8 @@ static Bitmask exprSelectUsage(WhereMaskSet *pMaskSet, Select *pS){
 ** in any index.  Return TRUE (1) if pExpr is an indexed term and return
 ** FALSE (0) if not.  If TRUE is returned, also set *piCur to the cursor
 ** number of the table that is indexed and *piColumn to the column number
-** of the column that is indexed, or -2 if an expression is being indexed.
+** of the column that is indexed, or XN_EXPR (-2) if an expression is being
+** indexed.
 **
 ** If pExpr is a TK_COLUMN column reference, then this routine always returns
 ** true even if that particular column is not indexed, because the column
@@ -861,10 +862,10 @@ static int exprMightBeIndexed(
   for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
     if( pIdx->aColExpr==0 ) continue;
     for(i=0; i<pIdx->nKeyCol; i++){
-      if( pIdx->aiColumn[i]!=(-2) ) continue;
+      if( pIdx->aiColumn[i]!=XN_EXPR ) continue;
       if( sqlite3ExprCompare(pExpr, pIdx->aColExpr->a[i].pExpr, iCur)==0 ){
         *piCur = iCur;
-        *piColumn = -2;
+        *piColumn = XN_EXPR;
         return 1;
       }
     }