]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Further improvements to .wheretrace during loop code generation.
authordrh <drh@noemail.net>
Sat, 28 Dec 2019 14:33:26 +0000 (14:33 +0000)
committerdrh <drh@noemail.net>
Sat, 28 Dec 2019 14:33:26 +0000 (14:33 +0000)
FossilOrigin-Name: c4d5b75c9381255ec8d9a284eedb6b27be46ca868cae5985cf8a5769b15290c3

manifest
manifest.uuid
src/wherecode.c

index f39579c83490f57b0223d9484c1da387c6f9f250..6a64d35c8da8d38d3e76e652dbce941af491c67f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C New\senhancements\sto\s.wheretrace.\s\sThe\s0x20000\sflag\sshows\sthe\sWHERE\sclause\nbefore\sand\safter\scoding\seach\sloop.\s\sThe\s0x800\sflag\sshows\sstatus\sat\sthe\sstart\nand\sat\sthe\send\sof\seach\sloop.\s\sAn\sextra\s"C"\stag\sis\sshown\son\scoded\sterms.
-D 2019-12-28T14:07:22.649
+C Further\simprovements\sto\s.wheretrace\sduring\sloop\scode\sgeneration.
+D 2019-12-28T14:33:26.487
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -616,7 +616,7 @@ F src/wal.h 606292549f5a7be50b6227bd685fa76e3a4affad71bb8ac5ce4cb5c79f6a176a
 F src/walker.c a137468bf36c92e64d2275caa80c83902e3a0fc59273591b96c6416d3253d05d
 F src/where.c 97f19d664256aaf86e4aac1323992c6fda5deb44ed35320539fdb3faa31307b1
 F src/whereInt.h de1b77e416ad5a7cc60a71fc1317484f8d83ca1e52b805dc8c978785a92eeded
-F src/wherecode.c d074abccfbd4ef2becc34aea640d326ff76709c5867c2b049c719a4ce5b74c06
+F src/wherecode.c 65e1df2a4799851ada548501b19baf513f38e64a9402036e4a91be8feff9fb4f
 F src/whereexpr.c 4b34be1434183e7bb8a05d4bf42bd53ea53021b0b060936fbd12062b4ff6b396
 F src/window.c 87795bb8293179cb8a92529264d49bd66b5bcad5e91cfc17dd8d3e66a2a77f88
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
@@ -1853,7 +1853,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 85e76887761b5d7e290fb2bac7f9121648f79d67fdd92f624d81632f28620518
-R 1054236a3bfbc2d93687a4e1f244d884
+P 59cc46e5a6d8dbb030f27716ad5446ecccf81cf0cfff95338b9133777f2059e7
+R 4ed5224f9f23343ff8f97a18a62ae7a0
 U drh
-Z 90307d93afa9b9f29e276d59812ee8ca
+Z 5832f3b0b02728bce6e85899b65adc52
index b66df9977f228bc22e4d9e4931da796dac040a71..c92b473c149dfa14d14186608fd3784d99f5f5dc 100644 (file)
@@ -1 +1 @@
-59cc46e5a6d8dbb030f27716ad5446ecccf81cf0cfff95338b9133777f2059e7
\ No newline at end of file
+c4d5b75c9381255ec8d9a284eedb6b27be46ca868cae5985cf8a5769b15290c3
\ No newline at end of file
index 8495de3781f866496d518113eeff66039670cc65..e9cdc191995fd18fc1125232ea59386b6040fc88 100644 (file)
@@ -1286,12 +1286,16 @@ Bitmask sqlite3WhereCodeOneLoopStart(
   VdbeModuleComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName));
 #if WHERETRACE_ENABLED /* 0x20800 */
   if( sqlite3WhereTrace & 0x800 ){
-    sqlite3DebugPrintf("Coding level %d:  notReady=%llx\n",
-       iLevel, (u64)notReady);
+    sqlite3DebugPrintf("Coding level %d of %d:  notReady=%llx\n",
+       iLevel, pWInfo->nLevel, (u64)notReady);
     sqlite3WhereLoopPrint(pLoop, pWC);
   }
   if( sqlite3WhereTrace & 0x20000 ){
-    sqlite3DebugPrintf("Complete WHERE clause before coding:\n");
+    if( iLevel==0 ){
+      sqlite3DebugPrintf("WHERE clause being coded:\n");
+      sqlite3TreeViewExpr(0, pWInfo->pWhere, 0);
+    }
+    sqlite3DebugPrintf("All WHERE-clause terms before coding:\n");
     sqlite3WhereClausePrint(pWC);
   }
 #endif
@@ -2379,13 +2383,13 @@ Bitmask sqlite3WhereCodeOneLoopStart(
     if( pTerm->leftCursor!=iCur ) continue;
     if( pLevel->iLeftJoin ) continue;
     pE = pTerm->pExpr;
-    assert( !ExprHasProperty(pE, EP_FromJoin) );
 #ifdef WHERETRACE_ENABLED /* 0x800 */
     if( sqlite3WhereTrace & 0x800 ){
       sqlite3DebugPrintf("Coding transitive constraint:\n");
       sqlite3WhereTermPrint(pTerm, pWC->nTerm-j);
     }
 #endif
+    assert( !ExprHasProperty(pE, EP_FromJoin) );
     assert( (pTerm->prereqRight & pLevel->notReady)!=0 );
     pAlt = sqlite3WhereFindTerm(pWC, iCur, pTerm->u.leftColumn, notReady,
                     WO_EQ|WO_IN|WO_IS, 0);
@@ -2429,7 +2433,8 @@ Bitmask sqlite3WhereCodeOneLoopStart(
 
 #if WHERETRACE_ENABLED /* 0x20800 */
   if( sqlite3WhereTrace & 0x20000 ){
-    sqlite3DebugPrintf("Complete WHERE clause after coding level %d:\n",iLevel);
+    sqlite3DebugPrintf("All WHERE-clause terms after coding level %d:\n",
+                       iLevel);
     sqlite3WhereClausePrint(pWC);
   }
   if( sqlite3WhereTrace & 0x800 ){