From a979993b25266d6a0f8a91ed36cf817162e86700 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Fri, 19 Mar 2021 13:00:28 +0000
Subject: [PATCH 1/4] Improved labeling of EXPLAIN QUERY PLAN output.  Many
 test failures due to the different output format.

FossilOrigin-Name: 6f8faec0222a7ca07cc1a5ed16cc08d92c6e20bbcb34851b4eff9e624de53601
---
 manifest        | 25 ++++++++++++++-----------
 manifest.uuid   |  2 +-
 src/build.c     |  2 +-
 src/insert.c    |  4 ++--
 src/printf.c    | 34 ++++++++++++++++++++++++----------
 src/select.c    | 12 ++++++------
 src/trigger.c   |  6 +++---
 src/wherecode.c | 12 ++----------
 8 files changed, 53 insertions(+), 44 deletions(-)

diff --git a/manifest b/manifest
index 95b93306a9..05c247a4ec 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sa\sNEVER()\son\sa\sbranch\sthat\swas\smade\sunreachable\sby\sthe\n"circular\sreference"\sfix.
-D 2021-03-18T20:04:46.953
+C Improved\slabeling\sof\sEXPLAIN\sQUERY\sPLAN\soutput.\s\sMany\stest\sfailures\sdue\sto\nthe\sdifferent\soutput\sformat.
+D 2021-03-19T13:00:28.477
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -486,7 +486,7 @@ F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
 F src/btree.c cfd2a37794532d765e235a2550ad2732924a6d06b07a3bc9f6a71750e3b3cca1
 F src/btree.h 096cc53baa58be22b02c896d1cf933c38cfc6d65f9253c1367ece8cc88a24de5
 F src/btreeInt.h 7bc15a24a02662409ebcd6aeaa1065522d14b7fda71573a2b0568b458f514ae0
-F src/build.c fec73c39d756f31d35ccbaa80fe1e040a8d675a318d4d30f41c444167bf3b860
+F src/build.c ef2a6632323b5705febb2b2fe14ab87068fbc8d17a3c70937e110b8a24113306
 F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
 F src/ctime.c 2a322b9a3d75771fb4d99e0702851f4f68dda982507a0f798eefb0712969a410
@@ -503,7 +503,7 @@ F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
 F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
 F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
-F src/insert.c 8942baede303a54ba3b6d06200d5b74c9bc25ababec8a55823e06309748cd4a3
+F src/insert.c 0f893f734487729a9d48a0335dcbb541f1e479e7f048d996e3a0b9dc69d427a2
 F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
 F src/loadext.c 8c9c8cd2bd8eecdb06d9b6e89de7e9e65bae45cc8fc33609cc74023a5c296067
 F src/main.c 2a7ece3a67c646e5fe9984ffe0277d6a76f80ce9715bf2faa591d8cb66b9d913
@@ -538,11 +538,11 @@ F src/pcache1.c 388304fd2d91c39591080b5e0f3c62cfba87db20370e7e0554062bfb29740e9f
 F src/pragma.c eb42cb9bec189cf18cef5d8fcae56e13bb73ef2b019b198fb48740ced81bce95
 F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
 F src/prepare.c e21b54489b5c73b06ada15e6fc79b5c6f64b06701924a6ca98944ae59e06256f
-F src/printf.c 2b03a80d7c11bb422115dca175a18bf430e9c9dbaa0eee63b758f0c022f8f34f
+F src/printf.c 59c2222594b692bbf323b44e14c9d3c095799e91f1b10ca66fee0859fe24323e
 F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
 F src/resolve.c dd47248c2c914feb0d4428c27d782e2723971d32cfa5536f49306d080df4d45a
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
-F src/select.c 72b2a58bf6e01812c7ea392ab3dc9c7faa814d5558f98d9e4fd6a142f562c608
+F src/select.c f8ef9023982ebbc3bfa47b96590aa03d944d8766038ce5970d6762ff9949248b
 F src/shell.c.in 8df3912a7ca4873a1443d4adef1b25baee8c086ab479fd9c4f13ab03f98049ab
 F src/sqlite.h.in 3426a080ea1f222a73e3bd91e7eacbd30570a0117c03d42c6dde606f33e5e318
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@@ -608,7 +608,7 @@ F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
 F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
 F src/tokenize.c c64c49d7c2ec4490c2fef1f24350167ba16b03b0c6cee58ad1a1d70a4325d4e9
 F src/treeview.c c6260e1fa5f41c361b2409edc9b0050bcaef5bc4d6abc467fbc45f0d7ccf3d84
-F src/trigger.c 861c3ec2c5b0fc830bdf82470454a9324fad70cbaa96d2e208fb54577c9e8d28
+F src/trigger.c f555123aabf7f3d175cbe6d33c02783302cbdc0a7236203fa2a0539baf2d890e
 F src/update.c 0f5a61f0787199983530a33f6fffe4f52742f35fcdf6ccfad1078b1a8bc17723
 F src/upsert.c df8f1727d62b5987c4fd302cd4d7c0c84ae57cd65683c5a34a740dfe24039235
 F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
@@ -631,7 +631,7 @@ F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
 F src/walker.c d42d6c80ea363ef689a462e65eefcfe87deab924c50de5baa37ecb6af7d7ddaa
 F src/where.c 10d06b16670a1d2a992d52a9f08e49426d38a08fb0a7ae5f7f62fd023d560e1e
 F src/whereInt.h 446e5e8018f83358ef917cf32d8e6a86dc8430113d0b17e720f1839d3faa44c4
-F src/wherecode.c e57a8690311a75d06e723e8d379f9831de04aba300e07174d236e32a7f9c7a13
+F src/wherecode.c 40a5d24cd042fea137ec821725c57c3586d8b92a08da8a47e870c0695bff0817
 F src/whereexpr.c 53452fe2fb07be2f4cb17f55cc721416fae0092c00717f106faf289c990b6494
 F src/window.c 7e89ac4b6cd6bb9b7772234a625d19c39b530f4ac06e43688a8b7e6a1ab512a2
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
@@ -1910,7 +1910,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 ee86e2f4c5999a090a5d2fe8251107cf55e621a6b988f315eb82f462cc1e377d
-R 51db1a8cd353cea4b335d0a191e38003
+P 114d9780aecdd9f03f235fc1f2ab81ef89cb00b3bafa61cff612e939595ff5f0
+R 710195bef3f0d2c17fb0c771d4c8fb88
+T *branch * eqp-improvements
+T *sym-eqp-improvements *
+T -sym-trunk *
 U drh
-Z 06f86de8c8593bdbc3934905423493ca
+Z c0a2560796cb72b7c4ee37f12bd1d09c
diff --git a/manifest.uuid b/manifest.uuid
index 2a8120d42a..aae708644e 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-114d9780aecdd9f03f235fc1f2ab81ef89cb00b3bafa61cff612e939595ff5f0
\ No newline at end of file
+6f8faec0222a7ca07cc1a5ed16cc08d92c6e20bbcb34851b4eff9e624de53601
\ No newline at end of file
diff --git a/src/build.c b/src/build.c
index d60cb72677..5fcf69e6b6 100644
--- a/src/build.c
+++ b/src/build.c
@@ -4249,7 +4249,7 @@ void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){
   pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
   if( pIndex==0 ){
     if( !ifExists ){
-      sqlite3ErrorMsg(pParse, "no such index: %S", pName, 0);
+      sqlite3ErrorMsg(pParse, "no such index: %S", pName->a);
     }else{
       sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].zDatabase);
     }
diff --git a/src/insert.c b/src/insert.c
index f0b93ae376..d4f404c0be 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -817,7 +817,7 @@ void sqlite3Insert(
           bIdListInOrder = 0;
         }else{
           sqlite3ErrorMsg(pParse, "table %S has no column named %s",
-              pTabList, 0, pColumn->a[i].zName);
+              pTabList->a, pColumn->a[i].zName);
           pParse->checkSchema = 1;
           goto insert_cleanup;
         }
@@ -945,7 +945,7 @@ void sqlite3Insert(
     if( nColumn!=(pTab->nCol-nHidden) ){
       sqlite3ErrorMsg(pParse, 
          "table %S has %d columns but %d values were supplied",
-         pTabList, 0, pTab->nCol-nHidden, nColumn);
+         pTabList->a, pTab->nCol-nHidden, nColumn);
      goto insert_cleanup;
     }
   }
diff --git a/src/printf.c b/src/printf.c
index 9aab863ed2..58143e3023 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -29,7 +29,7 @@
 #define etSQLESCAPE2 10 /* Strings with '\'' doubled and enclosed in '',
                           NULL pointers replaced by SQL NULL.  %Q */
 #define etTOKEN      11 /* a pointer to a Token structure */
-#define etSRCLIST    12 /* a pointer to a SrcList */
+#define etSRCITEM    12 /* a pointer to a SrcItem */
 #define etPOINTER    13 /* The %p conversion */
 #define etSQLESCAPE3 14 /* %w -> Strings with '\"' doubled */
 #define etORDINAL    15 /* %r -> 1st, 2nd, 3rd, 4th, etc.  English only */
@@ -95,10 +95,16 @@ static const et_info fmtinfo[] = {
 
   /* All the rest are undocumented and are for internal use only */
   {  'T',  0, 0, etTOKEN,      0,  0 },
-  {  'S',  0, 0, etSRCLIST,    0,  0 },
+  {  'S',  0, 0, etSRCITEM,    0,  0 },
   {  'r', 10, 1, etORDINAL,    0,  0 },
 };
 
+/* Notes:
+**
+**    %S    Takes a pointer to SrcItem.  Shows name or database.name
+**    %!S   Like %S but also shows AS alias if an alias is available
+*/
+
 /* Floating point constants used for rounding */
 static const double arRound[] = {
   5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05,
@@ -853,21 +859,29 @@ void sqlite3_str_vappendf(
         length = width = 0;
         break;
       }
-      case etSRCLIST: {
-        SrcList *pSrc;
-        int k;
+      case etSRCITEM: {
         SrcItem *pItem;
         if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
-        pSrc = va_arg(ap, SrcList*);
-        k = va_arg(ap, int);
-        pItem = &pSrc->a[k];
+        pItem = va_arg(ap, SrcItem*);
         assert( bArgList==0 );
-        assert( k>=0 && k<pSrc->nSrc );
         if( pItem->zDatabase ){
           sqlite3_str_appendall(pAccum, pItem->zDatabase);
           sqlite3_str_append(pAccum, ".", 1);
         }
-        sqlite3_str_appendall(pAccum, pItem->zName);
+        if( pItem->zName ){
+          sqlite3_str_appendall(pAccum, pItem->zName);
+        }else{
+          sqlite3_str_append(pAccum, "(anonymous)", 11);
+        }
+        if( flag_altform2 ){
+          if( pItem->zAlias ){
+            sqlite3_str_append(pAccum, " AS ", 4);
+            sqlite3_str_appendall(pAccum, pItem->zAlias );
+          }
+          if( pItem->pSelect ){
+            sqlite3_str_appendf(pAccum, " SUBQUERY %u", pItem->pSelect->selId);
+          }
+        }
         length = width = 0;
         break;
       }
diff --git a/src/select.c b/src/select.c
index 0c0bd84f2e..d172e2da7e 100644
--- a/src/select.c
+++ b/src/select.c
@@ -6355,10 +6355,10 @@ int sqlite3Select(
      
       pItem->regReturn = ++pParse->nMem;
       sqlite3VdbeAddOp3(v, OP_InitCoroutine, pItem->regReturn, 0, addrTop);
-      VdbeComment((v, "%s", pItem->pTab->zName));
+      VdbeComment((v, "%!S", pItem));
       pItem->addrFillSub = addrTop;
       sqlite3SelectDestInit(&dest, SRT_Coroutine, pItem->regReturn);
-      ExplainQueryPlan((pParse, 1, "CO-ROUTINE %u", pSub->selId));
+      ExplainQueryPlan((pParse, 1, "CO-ROUTINE %!S", pItem));
       sqlite3Select(pParse, pSub, &dest);
       pItem->pTab->nRowLogEst = pSub->nSelectRow;
       pItem->fg.viaCoroutine = 1;
@@ -6400,17 +6400,17 @@ int sqlite3Select(
         ** a trigger, then we only need to compute the value of the subquery
         ** once. */
         onceAddr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);
-        VdbeComment((v, "materialize \"%s\"", pItem->pTab->zName));
+        VdbeComment((v, "materialize %!S", pItem));
       }else{
-        VdbeNoopComment((v, "materialize \"%s\"", pItem->pTab->zName));
+        VdbeNoopComment((v, "materialize %!S", pItem));
       }
       sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
-      ExplainQueryPlan((pParse, 1, "MATERIALIZE %u", pSub->selId));
+      ExplainQueryPlan((pParse, 1, "MATERIALIZE %!S", pItem));
       sqlite3Select(pParse, pSub, &dest);
       pItem->pTab->nRowLogEst = pSub->nSelectRow;
       if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr);
       retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
-      VdbeComment((v, "end %s", pItem->pTab->zName));
+      VdbeComment((v, "end %!S", pItem));
       sqlite3VdbeChangeP1(v, topAddr, retAddr);
       sqlite3ClearTempRegCache(pParse);
       if( pItem->fg.isCte ){
diff --git a/src/trigger.c b/src/trigger.c
index 689c7c741e..562084561e 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -209,12 +209,12 @@ void sqlite3BeginTrigger(
   */
   if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
     sqlite3ErrorMsg(pParse, "cannot create %s trigger on view: %S", 
-        (tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName, 0);
+        (tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName->a);
     goto trigger_orphan_error;
   }
   if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
     sqlite3ErrorMsg(pParse, "cannot create INSTEAD OF"
-        " trigger on table: %S", pTableName, 0);
+        " trigger on table: %S", pTableName->a);
     goto trigger_orphan_error;
   }
 
@@ -611,7 +611,7 @@ void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
   }
   if( !pTrigger ){
     if( !noErr ){
-      sqlite3ErrorMsg(pParse, "no such trigger: %S", pName, 0);
+      sqlite3ErrorMsg(pParse, "no such trigger: %S", pName->a);
     }else{
       sqlite3CodeVerifyNamedSchema(pParse, zDb);
     }
diff --git a/src/wherecode.c b/src/wherecode.c
index a7a76fb704..195c08de3e 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -148,16 +148,8 @@ int sqlite3WhereExplainOneScan(
             || (wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX));
 
     sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
-    sqlite3_str_appendall(&str, isSearch ? "SEARCH" : "SCAN");
-    if( pItem->pSelect ){
-      sqlite3_str_appendf(&str, " SUBQUERY %u", pItem->pSelect->selId);
-    }else{
-      sqlite3_str_appendf(&str, " TABLE %s", pItem->zName);
-    }
-
-    if( pItem->zAlias ){
-      sqlite3_str_appendf(&str, " AS %s", pItem->zAlias);
-    }
+    str.printfFlags = SQLITE_PRINTF_INTERNAL;
+    sqlite3_str_appendf(&str, "%s %!S", isSearch ? "SEARCH" : "SCAN", pItem);
     if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
       const char *zFmt = 0;
       Index *pIdx;

From 6610e6a54fa48bc7a60263a54232559862f1176c Mon Sep 17 00:00:00 2001
From: drh <>
Date: Fri, 19 Mar 2021 19:44:56 +0000
Subject: [PATCH 2/4] Further simplification of the EQP output.  Only show
 "SUBQUERY n" if the subquery is anonymous.

FossilOrigin-Name: 1fadd30525dbf22678ba014b78af3a0fb33047692f073b7c62a90a028081ac48
---
 manifest       | 14 +++++++-------
 manifest.uuid  |  2 +-
 src/printf.c   |  7 ++-----
 src/treeview.c | 10 +---------
 4 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/manifest b/manifest
index 5f911a3705..9da9d6b6c1 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\senhancements\sfrom\strunk.
-D 2021-03-19T19:09:24.666
+C Further\ssimplification\sof\sthe\sEQP\soutput.\s\sOnly\sshow\s"SUBQUERY\sn"\sif\sthe\nsubquery\sis\sanonymous.
+D 2021-03-19T19:44:56.303
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -538,7 +538,7 @@ F src/pcache1.c 388304fd2d91c39591080b5e0f3c62cfba87db20370e7e0554062bfb29740e9f
 F src/pragma.c eb42cb9bec189cf18cef5d8fcae56e13bb73ef2b019b198fb48740ced81bce95
 F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
 F src/prepare.c e21b54489b5c73b06ada15e6fc79b5c6f64b06701924a6ca98944ae59e06256f
-F src/printf.c 59c2222594b692bbf323b44e14c9d3c095799e91f1b10ca66fee0859fe24323e
+F src/printf.c 492d108f65b45fe44ce1bbbcc22905913d9f74b9b148b0991cdc8f1d71cbb553
 F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
 F src/resolve.c dd47248c2c914feb0d4428c27d782e2723971d32cfa5536f49306d080df4d45a
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
@@ -607,7 +607,7 @@ F src/test_window.c cdae419fdcea5bad6dcd9368c685abdad6deb59e9fc8b84b153de513d394
 F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
 F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
 F src/tokenize.c 0b9c82fa628b5adce93e2bcaf935a24d43eb83344fb51551f7835526d0693fc4
-F src/treeview.c c6260e1fa5f41c361b2409edc9b0050bcaef5bc4d6abc467fbc45f0d7ccf3d84
+F src/treeview.c 70f57a2b77e20b354724ea69b8ed1ea1df946c48296d695320c741c7d174be90
 F src/trigger.c f555123aabf7f3d175cbe6d33c02783302cbdc0a7236203fa2a0539baf2d890e
 F src/update.c 0f5a61f0787199983530a33f6fffe4f52742f35fcdf6ccfad1078b1a8bc17723
 F src/upsert.c df8f1727d62b5987c4fd302cd4d7c0c84ae57cd65683c5a34a740dfe24039235
@@ -1910,7 +1910,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 6f8faec0222a7ca07cc1a5ed16cc08d92c6e20bbcb34851b4eff9e624de53601 f12b54042e27b2fe99f23f97c103ee4371f8d4df3b049d9bb5d64891db56eee5
-R b1c29a6e3125d2bf75454721444d7112
+P d192d737755876293a2914fcb9a0d5efbe07f3cd281c038666ea5aa879c06321
+R 8ac03dd6ce9964e338a0be1a587d3ab0
 U drh
-Z e489e4a1a305f57f100d2d980cdadf52
+Z eccc7f04bdba355f6e2efe4a8c6f321e
diff --git a/manifest.uuid b/manifest.uuid
index f97cdf851f..295052d3ce 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-d192d737755876293a2914fcb9a0d5efbe07f3cd281c038666ea5aa879c06321
\ No newline at end of file
+1fadd30525dbf22678ba014b78af3a0fb33047692f073b7c62a90a028081ac48
\ No newline at end of file
diff --git a/src/printf.c b/src/printf.c
index 58143e3023..0fb3158e9b 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -870,17 +870,14 @@ void sqlite3_str_vappendf(
         }
         if( pItem->zName ){
           sqlite3_str_appendall(pAccum, pItem->zName);
-        }else{
-          sqlite3_str_append(pAccum, "(anonymous)", 11);
+        }else if( pItem->pSelect ){
+          sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
         }
         if( flag_altform2 ){
           if( pItem->zAlias ){
             sqlite3_str_append(pAccum, " AS ", 4);
             sqlite3_str_appendall(pAccum, pItem->zAlias );
           }
-          if( pItem->pSelect ){
-            sqlite3_str_appendf(pAccum, " SUBQUERY %u", pItem->pSelect->selId);
-          }
         }
         length = width = 0;
         break;
diff --git a/src/treeview.c b/src/treeview.c
index b696d764e0..9765586980 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -134,19 +134,11 @@ void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){
     StrAccum x;
     char zLine[100];
     sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
-    sqlite3_str_appendf(&x, "{%d:*}", pItem->iCursor);
-    if( pItem->zDatabase ){
-      sqlite3_str_appendf(&x, " %s.%s", pItem->zDatabase, pItem->zName);
-    }else if( pItem->zName ){
-      sqlite3_str_appendf(&x, " %s", pItem->zName);
-    }
+    sqlite3_str_appendf(&x, "{%d:*} %!S", pItem->iCursor, pItem);
     if( pItem->pTab ){
       sqlite3_str_appendf(&x, " tab=%Q nCol=%d ptr=%p used=%llx",
            pItem->pTab->zName, pItem->pTab->nCol, pItem->pTab, pItem->colUsed);
     }
-    if( pItem->zAlias ){
-      sqlite3_str_appendf(&x, " (AS %s)", pItem->zAlias);
-    }
     if( pItem->fg.jointype & JT_LEFT ){
       sqlite3_str_appendf(&x, " LEFT-JOIN");
     }

From 8210233c7b963c391ce5f7d636ef453d5ab78bd9 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 20 Mar 2021 15:11:29 +0000
Subject: [PATCH 3/4] Revise tests cases to align with the new EXPLAIN QUERY
 PLAN output.

FossilOrigin-Name: 50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
---
 ext/expert/expert1.test        |  65 ++++---
 ext/fts5/test/fts5plan.test    |  14 +-
 ext/fts5/test/fts5trigram.test |   3 +-
 ext/rtree/rtree6.test          |  24 +--
 ext/rtree/rtreeC.test          |  88 ++++-----
 manifest                       | 226 +++++++++++------------
 manifest.uuid                  |   2 +-
 src/printf.c                   |  18 +-
 src/select.c                   |   2 +-
 src/shell.c.in                 |   4 +-
 test/altermalloc3.test         |   1 -
 test/altertab.test             |   1 -
 test/analyze3.test             |  30 +--
 test/analyze4.test             |   2 +-
 test/analyze6.test             |  24 +--
 test/analyze7.test             |  32 ++--
 test/analyze8.test             |  22 +--
 test/analyze9.test             |  30 +--
 test/analyzeC.test             |   2 +-
 test/analyzeD.test             |   8 +-
 test/analyzeE.test             |  88 ++++-----
 test/analyzeF.test             |   4 +-
 test/analyzeG.test             |   2 +-
 test/attach4.test              |   1 -
 test/autoindex1.test           |  30 +--
 test/autoindex3.test           |   8 +-
 test/autoindex5.test           |   2 +-
 test/bestindex1.test           |  10 +-
 test/bestindex2.test           |  30 +--
 test/bestindex3.test           |  16 +-
 test/bestindex4.test           |   8 +-
 test/bestindex7.test           |   1 -
 test/between.test              |   6 +-
 test/bigmmap.test              |   4 +-
 test/busy2.test                |   1 -
 test/columncount.test          |   1 -
 test/cost.test                 |  46 ++---
 test/count.test                |   8 +-
 test/coveridxscan.test         |   4 +-
 test/e_createtable.test        |   6 +-
 test/e_fkey.test               |  18 +-
 test/eqp.test                  | 324 +++++++++++++++++----------------
 test/exists2.test              |  20 +-
 test/existsfault.test          |   1 -
 test/fts3aux1.test             |  34 ++--
 test/fts3corrupt6.test         |   2 -
 test/fts3join.test             |   8 +-
 test/fts3query.test            |  16 +-
 test/fts3snippet2.test         |   1 -
 test/fts4upfrom.test           |   1 -
 test/hook.test                 |   1 -
 test/in4.test                  |   2 +-
 test/index6.test               |  12 +-
 test/index7.test               |  14 +-
 test/index8.test               |   2 +-
 test/indexedby.test            |  62 +++----
 test/indexexpr1.test           |   4 +-
 test/indexexpr2.test           |  10 +-
 test/intpkey.test              |   2 +-
 test/join2.test                |  34 ++--
 test/join5.test                |  10 +-
 test/like.test                 |  12 +-
 test/like3.test                |  24 +--
 test/mallocK.test              |   2 +-
 test/misc7.test                |   6 +-
 test/notnull2.test             |   1 -
 test/notnullfault.test         |   1 -
 test/nulls1.test               |  10 +-
 test/orderby1.test             |   2 +-
 test/returning1.test           |   1 -
 test/rollback2.test            |   4 +-
 test/rowvalue.test             |  10 +-
 test/rowvalue4.test            |  34 ++--
 test/scanstatus.test           |  86 ++++-----
 test/select9.test              |   6 +-
 test/selectA.test              |   4 +-
 test/selectD.test              |   2 +-
 test/skipscan1.test            |   4 +-
 test/skipscan2.test            |   2 +-
 test/skipscan5.test            |  24 +--
 test/skipscan6.test            |   4 +-
 test/tkt-385a5b56b9.test       |   8 +-
 test/tkt-78e04e52ea.test       |   6 +-
 test/tkt-b75a9ca6b0.test       |   4 +-
 test/tkt3442.test              |   6 +-
 test/tpch01.test               |  14 +-
 test/transitive1.test          |   4 +-
 test/triggerupfrom.test        |   1 -
 test/unordered.test            |  28 +--
 test/upfrom2.test              |   2 -
 test/upfrom3.test              |   1 -
 test/upfromfault.test          |   1 -
 test/walsetlk.test             |   1 -
 test/where.test                |  20 +-
 test/where2.test               |  10 +-
 test/where3.test               |  50 ++---
 test/where7.test               |   6 +-
 test/where9.test               |  20 +-
 test/whereE.test               |   8 +-
 test/whereF.test               |   6 +-
 test/whereG.test               |  28 +--
 test/whereI.test               |   8 +-
 test/whereJ.test               |   6 +-
 test/whereK.test               |  10 +-
 test/whereL.test               |  14 +-
 test/windowpushd.test          |   9 +-
 test/with1.test                |   6 +-
 test/with3.test                |  42 ++---
 test/with6.test                | 118 ++++++------
 test/without_rowid6.test       |   8 +-
 110 files changed, 1066 insertions(+), 1070 deletions(-)

diff --git a/ext/expert/expert1.test b/ext/expert/expert1.test
index 0e6fc82604..3987d0c910 100644
--- a/ext/expert/expert1.test
+++ b/ext/expert/expert1.test
@@ -103,7 +103,7 @@ do_setup_rec_test $tn.1 { CREATE TABLE t1(a, b, c) } {
   SELECT * FROM t1
 } {
   (no new indexes)
-  SCAN TABLE t1
+  SCAN t1
 }
 
 do_setup_rec_test $tn.2 {
@@ -112,7 +112,7 @@ do_setup_rec_test $tn.2 {
   SELECT * FROM t1 WHERE b>?;
 } {
   CREATE INDEX t1_idx_00000062 ON t1(b);
-  SEARCH TABLE t1 USING INDEX t1_idx_00000062 (b>?)
+  SEARCH t1 USING INDEX t1_idx_00000062 (b>?)
 }
 
 do_setup_rec_test $tn.3 {
@@ -121,7 +121,7 @@ do_setup_rec_test $tn.3 {
   SELECT * FROM t1 WHERE b COLLATE nocase BETWEEN ? AND ?
 } {
   CREATE INDEX t1_idx_3e094c27 ON t1(b COLLATE NOCASE);
-  SEARCH TABLE t1 USING INDEX t1_idx_3e094c27 (b>? AND b<?)
+  SEARCH t1 USING INDEX t1_idx_3e094c27 (b>? AND b<?)
 }
 
 do_setup_rec_test $tn.4 {
@@ -130,7 +130,7 @@ do_setup_rec_test $tn.4 {
   SELECT a FROM t1 ORDER BY b;
 } {
   CREATE INDEX t1_idx_00000062 ON t1(b);
-  SCAN TABLE t1 USING INDEX t1_idx_00000062
+  SCAN t1 USING INDEX t1_idx_00000062
 }
 
 do_setup_rec_test $tn.5 {
@@ -139,7 +139,7 @@ do_setup_rec_test $tn.5 {
   SELECT a FROM t1 WHERE a=? ORDER BY b;
 } {
   CREATE INDEX t1_idx_000123a7 ON t1(a, b);
-  SEARCH TABLE t1 USING COVERING INDEX t1_idx_000123a7 (a=?)
+  SEARCH t1 USING COVERING INDEX t1_idx_000123a7 (a=?)
 }
 
 if 0 {
@@ -149,7 +149,7 @@ do_setup_rec_test $tn.6 {
   SELECT min(a) FROM t1
 } {
   CREATE INDEX t1_idx_00000061 ON t1(a);
-  SEARCH TABLE t1 USING COVERING INDEX t1_idx_00000061
+  SEARCH t1 USING COVERING INDEX t1_idx_00000061
 }
 }
 
@@ -159,7 +159,7 @@ do_setup_rec_test $tn.7 {
   SELECT * FROM t1 ORDER BY a, b, c;
 } {
   CREATE INDEX t1_idx_033e95fe ON t1(a, b, c);
-  SCAN TABLE t1 USING COVERING INDEX t1_idx_033e95fe
+  SCAN t1 USING COVERING INDEX t1_idx_033e95fe
 }
 
 #do_setup_rec_test $tn.1.8 {
@@ -168,7 +168,7 @@ do_setup_rec_test $tn.7 {
 #  SELECT * FROM t1 ORDER BY a ASC, b COLLATE nocase DESC, c ASC;
 #} {
 #  CREATE INDEX t1_idx_5be6e222 ON t1(a, b COLLATE NOCASE DESC, c);
-#  0|0|0|SCAN TABLE t1 USING COVERING INDEX t1_idx_5be6e222
+#  0|0|0|SCAN t1 USING COVERING INDEX t1_idx_5be6e222
 #}
 
 do_setup_rec_test $tn.8.1 {
@@ -177,7 +177,7 @@ do_setup_rec_test $tn.8.1 {
   SELECT * FROM t1 WHERE a=?
 } {
   CREATE INDEX t1_idx_00000061 ON t1(a);
-  SEARCH TABLE t1 USING INDEX t1_idx_00000061 (a=?)
+  SEARCH t1 USING INDEX t1_idx_00000061 (a=?)
 }
 do_setup_rec_test $tn.8.2 {
   CREATE TABLE t1(a, b COLLATE nocase, c);
@@ -185,7 +185,7 @@ do_setup_rec_test $tn.8.2 {
   SELECT * FROM t1 ORDER BY a ASC, b DESC, c ASC;
 } {
   CREATE INDEX t1_idx_5cb97285 ON t1(a, b DESC, c);
-  SCAN TABLE t1 USING COVERING INDEX t1_idx_5cb97285
+  SCAN t1 USING COVERING INDEX t1_idx_5cb97285
 }
 
 
@@ -197,7 +197,7 @@ do_setup_rec_test $tn.9.1 {
   SELECT * FROM "t t" WHERE a=?
 } {
   CREATE INDEX 't t_idx_00000061' ON 't t'(a);
-  SEARCH TABLE t t USING INDEX t t_idx_00000061 (a=?) 
+  SEARCH t t USING INDEX t t_idx_00000061 (a=?) 
 }
 
 do_setup_rec_test $tn.9.2 {
@@ -206,7 +206,7 @@ do_setup_rec_test $tn.9.2 {
   SELECT * FROM "t t" WHERE b BETWEEN ? AND ?
 } {
   CREATE INDEX 't t_idx_00000062' ON 't t'(b);
-  SEARCH TABLE t t USING INDEX t t_idx_00000062 (b>? AND b<?)
+  SEARCH t t USING INDEX t t_idx_00000062 (b>? AND b<?)
 }
 
 # Columns with names that require quotes.
@@ -217,7 +217,7 @@ do_setup_rec_test $tn.10.1 {
   SELECT * FROM t3 WHERE "b b" = ?
 } {
   CREATE INDEX t3_idx_00050c52 ON t3('b b');
-  SEARCH TABLE t3 USING INDEX t3_idx_00050c52 (b b=?)
+  SEARCH t3 USING INDEX t3_idx_00050c52 (b b=?)
 }
 
 do_setup_rec_test $tn.10.2 {
@@ -226,7 +226,7 @@ do_setup_rec_test $tn.10.2 {
   SELECT * FROM t3 ORDER BY "b b"
 } {
   CREATE INDEX t3_idx_00050c52 ON t3('b b');
-  SCAN TABLE t3 USING INDEX t3_idx_00050c52
+  SCAN t3 USING INDEX t3_idx_00050c52
 }
 
 # Transitive constraints
@@ -239,8 +239,8 @@ do_setup_rec_test $tn.11.1 {
 } {
   CREATE INDEX t5_idx_000123a7 ON t5(a, b);
   CREATE INDEX t6_idx_00000063 ON t6(c);
-  SEARCH TABLE t6 USING INDEX t6_idx_00000063 (c=?) 
-  SEARCH TABLE t5 USING COVERING INDEX t5_idx_000123a7 (a=? AND b=?)
+  SEARCH t6 USING INDEX t6_idx_00000063 (c=?) 
+  SEARCH t5 USING COVERING INDEX t5_idx_000123a7 (a=? AND b=?)
 }
 
 # OR terms.
@@ -254,9 +254,9 @@ do_setup_rec_test $tn.12.1 {
   CREATE INDEX t7_idx_00000061 ON t7(a);
   MULTI-INDEX OR
     INDEX 1
-      SEARCH TABLE t7 USING INDEX t7_idx_00000061 (a=?) 
+      SEARCH t7 USING INDEX t7_idx_00000061 (a=?) 
     INDEX 2
-      SEARCH TABLE t7 USING INDEX t7_idx_00000062 (b=?)
+      SEARCH t7 USING INDEX t7_idx_00000062 (b=?)
 }
 
 # rowid terms.
@@ -267,7 +267,7 @@ do_setup_rec_test $tn.13.1 {
   SELECT * FROM t8 WHERE rowid=?
 } {
   (no new indexes)
-  SEARCH TABLE t8 USING INTEGER PRIMARY KEY (rowid=?)
+  SEARCH t8 USING INTEGER PRIMARY KEY (rowid=?)
 }
 do_setup_rec_test $tn.13.2 {
   CREATE TABLE t8(a, b);
@@ -275,7 +275,7 @@ do_setup_rec_test $tn.13.2 {
   SELECT * FROM t8 ORDER BY rowid
 } {
   (no new indexes)
-  SCAN TABLE t8
+  SCAN t8
 }
 do_setup_rec_test $tn.13.3 {
   CREATE TABLE t8(a, b);
@@ -283,7 +283,7 @@ do_setup_rec_test $tn.13.3 {
   SELECT * FROM t8 WHERE a=? ORDER BY rowid
 } {
   CREATE INDEX t8_idx_00000061 ON t8(a); 
-  SEARCH TABLE t8 USING INDEX t8_idx_00000061 (a=?)
+  SEARCH t8 USING INDEX t8_idx_00000061 (a=?)
 }
 
 # Triggers
@@ -298,7 +298,7 @@ do_setup_rec_test $tn.14 {
   INSERT INTO t9 VALUES(?, ?, ?);
 } {
   CREATE INDEX t10_idx_00000062 ON t10(b); 
-  SEARCH TABLE t10 USING INDEX t10_idx_00000062 (b=?)
+  SEARCH t10 USING INDEX t10_idx_00000062 (b=?)
 }
 
 do_setup_rec_test $tn.15 {
@@ -314,8 +314,8 @@ do_setup_rec_test $tn.15 {
   SELECT * FROM t2, t1 WHERE b=? AND d=? AND t2.rowid=t1.rowid
 } {
   CREATE INDEX t2_idx_00000064 ON t2(d);
-  SEARCH TABLE t2 USING INDEX t2_idx_00000064 (d=?) 
-  SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+  SEARCH t2 USING INDEX t2_idx_00000064 (d=?) 
+  SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_setup_rec_test $tn.16 {
@@ -324,7 +324,7 @@ do_setup_rec_test $tn.16 {
   SELECT * FROM t1 WHERE b IS NOT NULL;
 } {
   (no new indexes)
-  SCAN TABLE t1
+  SCAN t1
 }
 
 do_setup_rec_test $tn.17.1 {
@@ -333,7 +333,7 @@ do_setup_rec_test $tn.17.1 {
   SELECT * FROM example WHERE a=?
 } {
   (no new indexes)
-  SEARCH TABLE example USING INDEX sqlite_autoindex_example_1 (A=?)
+  SEARCH example USING INDEX sqlite_autoindex_example_1 (A=?)
 }
 do_setup_rec_test $tn.17.2 {
   CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -341,7 +341,7 @@ do_setup_rec_test $tn.17.2 {
   SELECT * FROM example WHERE b=?
 } {
   CREATE INDEX example_idx_00000042 ON example(B);
-  SEARCH TABLE example USING INDEX example_idx_00000042 (B=?)
+  SEARCH example USING INDEX example_idx_00000042 (B=?)
 }
 do_setup_rec_test $tn.17.3 {
   CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -349,7 +349,7 @@ do_setup_rec_test $tn.17.3 {
   SELECT * FROM example WHERE a=? AND b=?
 } {
   (no new indexes)
-  SEARCH TABLE example USING INDEX sqlite_autoindex_example_1 (A=? AND B=?)
+  SEARCH example USING INDEX sqlite_autoindex_example_1 (A=? AND B=?)
 }
 do_setup_rec_test $tn.17.4 {
   CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -357,7 +357,7 @@ do_setup_rec_test $tn.17.4 {
   SELECT * FROM example WHERE a=? AND b>?
 } {
   (no new indexes)
-  SEARCH TABLE example USING INDEX sqlite_autoindex_example_1 (A=? AND B>?)
+  SEARCH example USING INDEX sqlite_autoindex_example_1 (A=? AND B>?)
 }
 do_setup_rec_test $tn.17.5 {
   CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -365,7 +365,7 @@ do_setup_rec_test $tn.17.5 {
   SELECT * FROM example WHERE a>? AND b=?
 } {
   CREATE INDEX example_idx_0000cb3f ON example(B, A);
-  SEARCH TABLE example USING INDEX example_idx_0000cb3f (B=? AND A>?)
+  SEARCH example USING INDEX example_idx_0000cb3f (B=? AND A>?)
 }
 
 do_setup_rec_test $tn.18.0 {
@@ -377,7 +377,7 @@ do_setup_rec_test $tn.18.0 {
   SELECT x FROM SomeObject;
 } {
   (no new indexes)
-  SCAN TABLE SomeObject
+  SCAN SomeObject
 }
 do_setup_rec_test $tn.18.1 {
   CREATE TABLE SomeObject (
@@ -388,7 +388,7 @@ do_setup_rec_test $tn.18.1 {
   SELECT * FROM SomeObject WHERE x=?;
 } {
   CREATE INDEX SomeObject_idx_00000078 ON SomeObject(x);
-  SEARCH TABLE SomeObject USING COVERING INDEX SomeObject_idx_00000078 (x=?)
+  SEARCH SomeObject USING COVERING INDEX SomeObject_idx_00000078 (x=?)
 }
 
 }
@@ -455,4 +455,3 @@ do_execsql_test 5.3 {
 }
 
 finish_test
-
diff --git a/ext/fts5/test/fts5plan.test b/ext/fts5/test/fts5plan.test
index 7118427a2b..6862acf179 100644
--- a/ext/fts5/test/fts5plan.test
+++ b/ext/fts5/test/fts5plan.test
@@ -30,23 +30,23 @@ do_eqp_test 1.1 {
   SELECT * FROM t1, f1 WHERE f1 MATCH t1.x
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:M1
+  |--SCAN t1
+  `--SCAN f1 VIRTUAL TABLE INDEX 0:M1
 }
 
 do_eqp_test 1.2 {
   SELECT * FROM t1, f1 WHERE f1 > t1.x
 } {
   QUERY PLAN
-  |--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:
-  `--SCAN TABLE t1
+  |--SCAN f1 VIRTUAL TABLE INDEX 0:
+  `--SCAN t1
 }
 
 do_eqp_test 1.3 {
   SELECT * FROM f1 WHERE f1 MATCH ? ORDER BY ff
 } {
   QUERY PLAN
-  |--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:M1
+  |--SCAN f1 VIRTUAL TABLE INDEX 0:M1
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -54,12 +54,12 @@ do_eqp_test 1.4 {
   SELECT * FROM f1 ORDER BY rank
 } {
   QUERY PLAN
-  |--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:
+  |--SCAN f1 VIRTUAL TABLE INDEX 0:
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
 do_eqp_test 1.5 {
   SELECT * FROM f1 WHERE rank MATCH ?
-} {SCAN TABLE f1 VIRTUAL TABLE INDEX 0:r}
+} {SCAN f1 VIRTUAL TABLE INDEX 0:r}
 
 finish_test
diff --git a/ext/fts5/test/fts5trigram.test b/ext/fts5/test/fts5trigram.test
index 26eb7ba8de..fb66efed68 100644
--- a/ext/fts5/test/fts5trigram.test
+++ b/ext/fts5/test/fts5trigram.test
@@ -192,10 +192,9 @@ do_eqp_test 6.2 {
 } {VIRTUAL TABLE INDEX 0:G0}
 do_eqp_test 6.3 {
   SELECT * FROM ci1 WHERE x LIKE ?
-} {{SCAN TABLE ci1 VIRTUAL TABLE INDEX 0:}}
+} {{SCAN ci1 VIRTUAL TABLE INDEX 0:}}
 do_eqp_test 6.4 {
   SELECT * FROM ci1 WHERE x GLOB ?
 } {VIRTUAL TABLE INDEX 0:G0}
 
 finish_test
-
diff --git a/ext/rtree/rtree6.test b/ext/rtree/rtree6.test
index bc9ff84298..b6dfe992a6 100644
--- a/ext/rtree/rtree6.test
+++ b/ext/rtree/rtree6.test
@@ -79,47 +79,47 @@ do_eqp_test rtree6.2.1 {
   SELECT * FROM t1,t2 WHERE k=+ii AND x1<10
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 2:C0
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_eqp_test rtree6.2.2 {
   SELECT * FROM t1,t2 WHERE k=ii AND x1<10
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 2:C0
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_eqp_test rtree6.2.3 {
   SELECT * FROM t1,t2 WHERE k=ii
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 2:
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_eqp_test rtree6.2.4.1 {
   SELECT * FROM t1,t2 WHERE v=+ii and x1<10 and x2>10
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0E1
-  `--SEARCH TABLE t2 USING AUTOMATIC COVERING INDEX (v=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 2:C0E1
+  `--SEARCH t2 USING AUTOMATIC COVERING INDEX (v=?)
 }
 do_eqp_test rtree6.2.4.2 {
   SELECT * FROM t1,t2 WHERE v=10 and x1<10 and x2>10
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0E1
-  `--SEARCH TABLE t2 USING AUTOMATIC PARTIAL COVERING INDEX (v=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 2:C0E1
+  `--SEARCH t2 USING AUTOMATIC PARTIAL COVERING INDEX (v=?)
 }
 
 do_eqp_test rtree6.2.5 {
   SELECT * FROM t1,t2 WHERE k=ii AND x1<v
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 2:
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_execsql_test rtree6-3.1 {
diff --git a/ext/rtree/rtreeC.test b/ext/rtree/rtreeC.test
index 47ca3ad7b9..75afcd7e22 100644
--- a/ext/rtree/rtreeC.test
+++ b/ext/rtree/rtreeC.test
@@ -30,8 +30,8 @@ do_eqp_test 1.1 {
   WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
 } {
   QUERY PLAN
-  |--SCAN TABLE t
-  `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+  |--SCAN t
+  `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
 }
 
 do_eqp_test 1.2 {
@@ -39,8 +39,8 @@ do_eqp_test 1.2 {
   WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
 } {
   QUERY PLAN
-  |--SCAN TABLE t
-  `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+  |--SCAN t
+  `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
 }
 
 do_eqp_test 1.3 {
@@ -48,16 +48,16 @@ do_eqp_test 1.3 {
   WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND ?<=max_y
 } {
   QUERY PLAN
-  |--SCAN TABLE t
-  `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+  |--SCAN t
+  `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
 }
 
 do_eqp_test 1.5 {
   SELECT * FROM t, r_tree
 } {
   QUERY PLAN
-  |--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:
-  `--SCAN TABLE t
+  |--SCAN r_tree VIRTUAL TABLE INDEX 2:
+  `--SCAN t
 }
 
 do_execsql_test 2.0 {
@@ -87,8 +87,8 @@ do_eqp_test 2.1 {
   WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
 } {
   QUERY PLAN
-  |--SCAN TABLE t
-  `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+  |--SCAN t
+  `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
 }
 
 do_eqp_test 2.2 {
@@ -96,8 +96,8 @@ do_eqp_test 2.2 {
   WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
 } {
   QUERY PLAN
-  |--SCAN TABLE t
-  `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+  |--SCAN t
+  `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
 }
 
 do_eqp_test 2.3 {
@@ -105,16 +105,16 @@ do_eqp_test 2.3 {
   WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND ?<=max_y
 } {
   QUERY PLAN
-  |--SCAN TABLE t
-  `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+  |--SCAN t
+  `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
 }
 
 do_eqp_test 2.5 {
   SELECT * FROM t, r_tree
 } {
   QUERY PLAN
-  |--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:
-  `--SCAN TABLE t
+  |--SCAN r_tree VIRTUAL TABLE INDEX 2:
+  `--SCAN t
 }
 
 #-------------------------------------------------------------------------
@@ -128,24 +128,24 @@ do_execsql_test 3.1 {
 
 do_eqp_test 3.2.1 { SELECT * FROM t1 CROSS JOIN t2 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE t2
+  |--SCAN t1
+  `--SCAN t2
 }
 do_eqp_test 3.2.2 { SELECT * FROM t2 CROSS JOIN t1 } {
   QUERY PLAN
-  |--SCAN TABLE t2
-  `--SCAN TABLE t1
+  |--SCAN t2
+  `--SCAN t1
 }
 
 do_eqp_test 3.3.1 { SELECT * FROM t1 CROSS JOIN t3 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE t3 VIRTUAL TABLE INDEX 2:
+  |--SCAN t1
+  `--SCAN t3 VIRTUAL TABLE INDEX 2:
 }
 do_eqp_test 3.3.2 { SELECT * FROM t3 CROSS JOIN t1 } {
   QUERY PLAN
-  |--SCAN TABLE t3 VIRTUAL TABLE INDEX 2:
-  `--SCAN TABLE t1
+  |--SCAN t3 VIRTUAL TABLE INDEX 2:
+  `--SCAN t1
 }
 
 #--------------------------------------------------------------------
@@ -203,8 +203,8 @@ do_eqp_test 5.2 {
   SELECT * FROM t1, rt WHERE x==id;
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE rt VIRTUAL TABLE INDEX 1:
+  |--SCAN t1
+  `--SCAN rt VIRTUAL TABLE INDEX 1:
 }
 
 # Now create enough ANALYZE data to tell SQLite that virtual table "rt"
@@ -220,8 +220,8 @@ do_eqp_test 5.4 {
   SELECT * FROM t1, rt WHERE x==id;
 } {
   QUERY PLAN
-  |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:
-  `--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (x=?)
+  |--SCAN rt VIRTUAL TABLE INDEX 2:
+  `--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (x=?)
 }
 
 # Delete the ANALYZE data. "t1" should be the outer loop again.
@@ -233,8 +233,8 @@ do_eqp_test 5.6 {
   SELECT * FROM t1, rt WHERE x==id;
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE rt VIRTUAL TABLE INDEX 1:
+  |--SCAN t1
+  `--SCAN rt VIRTUAL TABLE INDEX 1:
 }
 
 # This time create and attach a database that contains ANALYZE data for
@@ -258,8 +258,8 @@ do_eqp_test 5.8 {
   SELECT * FROM t1, rt WHERE x==id;
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE rt VIRTUAL TABLE INDEX 1:
+  |--SCAN t1
+  `--SCAN rt VIRTUAL TABLE INDEX 1:
 }
 
 #--------------------------------------------------------------------
@@ -327,9 +327,9 @@ do_eqp_execsql_test 7.1 {
   WHERE (x1 BETWEEN xmin AND xmax);
 } {
   QUERY PLAN
-  |--SCAN TABLE xdir
-  |--SCAN TABLE ydir
-  `--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B2D3B0D1
+  |--SCAN xdir
+  |--SCAN ydir
+  `--SCAN rt VIRTUAL TABLE INDEX 2:B2D3B0D1
 } {
   2 4
 }
@@ -340,9 +340,9 @@ do_eqp_execsql_test 7.2 {
   WHERE (x1 BETWEEN xmin AND xmax);
 } {
   QUERY PLAN
-  |--SCAN TABLE xdir
-  |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B0D1
-  `--SCAN TABLE ydir
+  |--SCAN xdir
+  |--SCAN rt VIRTUAL TABLE INDEX 2:B0D1
+  `--SCAN ydir
 } {
   5 1 2 7 12 14 {}
   5 2 2 7  8 12 10
@@ -355,9 +355,9 @@ do_eqp_execsql_test 7.3 {
   WHERE (x1 BETWEEN xmin AND xmax);
 } {
   QUERY PLAN
-  |--SCAN TABLE xdir
-  |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B0D1
-  `--SCAN TABLE ydir
+  |--SCAN xdir
+  |--SCAN rt VIRTUAL TABLE INDEX 2:B0D1
+  `--SCAN ydir
 } {
   2 4
 }
@@ -368,9 +368,9 @@ do_eqp_execsql_test 7.4 {
   WHERE (x1 BETWEEN xmin AND xmax);
 } {
   QUERY PLAN
-  |--SCAN TABLE xdir
-  |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B0D1
-  `--SCAN TABLE ydir
+  |--SCAN xdir
+  |--SCAN rt VIRTUAL TABLE INDEX 2:B0D1
+  `--SCAN ydir
 } {
   2 4
 }
diff --git a/manifest b/manifest
index 9da9d6b6c1..6b7d4686f3 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Further\ssimplification\sof\sthe\sEQP\soutput.\s\sOnly\sshow\s"SUBQUERY\sn"\sif\sthe\nsubquery\sis\sanonymous.
-D 2021-03-19T19:44:56.303
+C Revise\stests\scases\sto\salign\swith\sthe\snew\sEXPLAIN\sQUERY\sPLAN\soutput.
+D 2021-03-20T15:11:29.894
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -50,7 +50,7 @@ F ext/async/sqlite3async.c 6f247666b495c477628dd19364d279c78ea48cd90c72d9f9b98ad
 F ext/async/sqlite3async.h 46b47c79357b97ad85d20d2795942c0020dc20c532114a49808287f04aa5309a
 F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
 F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4
-F ext/expert/expert1.test 63d778d964e55ef2d1a723043d91c59e7dc6ef1649d91c78c0bef00f9c6f1427
+F ext/expert/expert1.test 6703fd74711daf8230240680b0a348d0720e28819b602701adfbd32457fdcddd
 F ext/expert/sqlite3expert.c de51b187c629a4c4264d5de0b77862641e11426f7a963a92abf2d4077085fc8c
 F ext/expert/sqlite3expert.h ca81efc2679a92373a13a3e76a6138d0310e32be53d6c3bfaedabd158ea8969b
 F ext/expert/test_expert.c d56c194b769bdc90cf829a14c9ecbc1edca9c850b837a4d0b13be14095c32a72
@@ -200,7 +200,7 @@ F ext/fts5/test/fts5near.test 211477940142d733ac04fad97cb24095513ab2507073a99c27
 F ext/fts5/test/fts5onepass.test f9b7d9b2c334900c6542a869760290e2ab5382af8fbd618834bf1fcc3e7b84da
 F ext/fts5/test/fts5optimize.test 36a752d24c818792032e4ff502936fc9cc5ef938721696396fdc79214b2717f1
 F ext/fts5/test/fts5phrase.test 13e5d8e9083077b3d9c74315b3c92ec723cc6eb37c8155e0bfe1bba00559f07b
-F ext/fts5/test/fts5plan.test 79d35b5e83bbdcba48d946a7f008df161f6b0ede1a966892d0aa6c8dd0b6e773
+F ext/fts5/test/fts5plan.test b65cfcca9ddd6fdaa118c61e17aeec8e8433bc5b6bb307abd116514f79c49c5a
 F ext/fts5/test/fts5porter.test 8d08010c28527db66bc3feebd2b8767504aaeb9b101a986342fa7833d49d0d15
 F ext/fts5/test/fts5porter2.test 0d251a673f02fa13ca7f011654873b3add20745f7402f108600a23e52d8c7457
 F ext/fts5/test/fts5prefix.test a0fa67b06650f2deaa7bf27745899d94e0fb547ad9ecbd08bfad98c04912c056
@@ -219,7 +219,7 @@ F ext/fts5/test/fts5synonym2.test b54cce5c34ec08ed616f646635538ae82e34a0e28f947e
 F ext/fts5/test/fts5tok1.test 1f7817499f5971450d8c4a652114b3d833393c8134e32422d0af27884ffe9cef
 F ext/fts5/test/fts5tok2.test dcacb32d4a2a3f0dd3215d4a3987f78ae4be21a2
 F ext/fts5/test/fts5tokenizer.test ac3c9112b263a639fb0508ae73a3ee886bf4866d2153771a8e8a20c721305a43
-F ext/fts5/test/fts5trigram.test e2ce256fd0ccd6707e740aa3596206aedb0d5834b100c0cb49e344dcd1d8463c
+F ext/fts5/test/fts5trigram.test 5b4feb53a4d5aca70c841f6919c8719b5a9c805474727dda99285fccdd2e9cce
 F ext/fts5/test/fts5umlaut.test a42fe2fe6387c40c49ab27ccbd070e1ae38e07f38d05926482cc0bccac9ad602
 F ext/fts5/test/fts5unicode.test 17056f4efe6b0a5d4f41fdf7a7dc9af2873004562eaa899d40633b93dc95f5a9
 F ext/fts5/test/fts5unicode2.test 9b3df486de05fb4bde4aa7ee8de2e6dae1df6eb90e3f2e242c9383b95d314e3e
@@ -400,13 +400,13 @@ F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e130
 F ext/rtree/rtree3.test 4ee5d7df86040efe3d8d84f141f2962a7745452200a7cba1db06f86d97050499
 F ext/rtree/rtree4.test 304de65d484540111b896827e4261815e5dca4ce28eeecd58be648cd73452c4b
 F ext/rtree/rtree5.test 49c9041d713d54560b315c2c7ef7207ee287eba1b20f8266968a06f2e55d3142
-F ext/rtree/rtree6.test 1252a0439da01d2f1f5cbbdeeb80455a2d68b9bae2a9787937b167a5e3957828
+F ext/rtree/rtree6.test 9ce3691c1aac43070a9f194f0ebf54372db346c5a82241fd11b525ed53ce9f3f
 F ext/rtree/rtree7.test c8fb2e555b128dd0f0bdb520c61380014f497f8a23c40f2e820acc9f9e4fdce5
 F ext/rtree/rtree8.test 2d99006a1386663978c9e1df167554671e4f711c419175b39f332719deb1ce0e
 F ext/rtree/rtree9.test c646f12c8c1c68ef015c6c043d86a0c42488e2e68ed1bb1b0771a7ca246cbabf
 F ext/rtree/rtreeA.test ed2f1be9c06dde0b1ab93a95dd9e87eeaa02db2d30bcb4b9179b69ee3dc3319b
 F ext/rtree/rtreeB.test 4cec297f8e5c588654bbf3c6ed0903f10612be8a2878055dd25faf8c71758bc9
-F ext/rtree/rtreeC.test 6aa87eba4d9a3003b941a1ba77db259c5cabc3fd92fc5a6360f5369520eb9a4d
+F ext/rtree/rtreeC.test c4bfa9a61c6788c03e4a9ce40ab2cfc6100982559effd9842d1b658e1d47aa5f
 F ext/rtree/rtreeD.test fe46aa7f012e137bd58294409b16c0d43976c3bb92c8f710481e577c4a1100dc
 F ext/rtree/rtreeE.test e65d3fc625da1800b412fc8785817327d43ccfec5f5973912d8c9e471928caa9
 F ext/rtree/rtreeF.test 81ffa7ef51c4e4618d497a57328c265bf576990c7070633b623b23cd450ed331
@@ -538,12 +538,12 @@ F src/pcache1.c 388304fd2d91c39591080b5e0f3c62cfba87db20370e7e0554062bfb29740e9f
 F src/pragma.c eb42cb9bec189cf18cef5d8fcae56e13bb73ef2b019b198fb48740ced81bce95
 F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
 F src/prepare.c e21b54489b5c73b06ada15e6fc79b5c6f64b06701924a6ca98944ae59e06256f
-F src/printf.c 492d108f65b45fe44ce1bbbcc22905913d9f74b9b148b0991cdc8f1d71cbb553
+F src/printf.c 987fdc0ea410ef5eae634a538403faf89c7e6ec9b5b70457d5148605aa9f1241
 F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
 F src/resolve.c dd47248c2c914feb0d4428c27d782e2723971d32cfa5536f49306d080df4d45a
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
-F src/select.c 5095a9f76ed7a1e15796a813e3f616b539a9f16c5d3c963bcbe869c545ffd493
-F src/shell.c.in 8df3912a7ca4873a1443d4adef1b25baee8c086ab479fd9c4f13ab03f98049ab
+F src/select.c fe0a11d7cf2eddd58cf6fc5f65a5faac1eb430102a3f00092673a499bfd4a50e
+F src/shell.c.in 6592c2b1b752e5988c27112370fdf6edf9c5d36959f5134291202930cd967a4d
 F src/sqlite.h.in 3426a080ea1f222a73e3bd91e7eacbd30570a0117c03d42c6dde606f33e5e318
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 61b38c073d5e1e96a3d45271b257aef27d0d13da2bea5347692ae579475cd95e
@@ -654,24 +654,24 @@ F test/alterdropcol2.test 527fce683b200d620f560f666c44ae33e22728e990a10a48a54328
 F test/alterlegacy.test f38c6d06cda39e1f7b955bbce57f2e3ef5b7cb566d3d1234502093e228c15811
 F test/altermalloc.test 167a47de41b5c638f5f5c6efb59784002b196fff70f98d9b4ed3cd74a3fb80c9
 F test/altermalloc2.test fa7b1c1139ea39b8dec407cf1feb032ca8e0076bd429574969b619175ad0174b
-F test/altermalloc3.test 2c7bbd8cf3e9c4a91e28675bb62bcc2ef70f227967fa74349f03d9f4642f0615
-F test/altertab.test 7691872aadfe00a94b459af9086504bcf399dd936336e486da1b182930744b77
+F test/altermalloc3.test a3aa6473d8a2086cb568ace146b2520442699bb16970399fb48e9074891ead6d
+F test/altertab.test d15362de3d487368e1f64d600fdfc1976033aecf8394c0a88454a5c63b357209
 F test/altertab2.test b0d62f323ca5dab42b0bc028c52e310ebdd13e655e8fac070fe622bad7852c2b
 F test/altertab3.test 2b82fa2236a3a91553d53ae5555d8e723c7eec174c41f1fa62ff497355398479
 F test/amatch1.test b5ae7065f042b7f4c1c922933f4700add50cdb9f
 F test/analyze.test 547bb700f903107b38611b014ca645d6b5bb819f5210d7bf39c40802aafeb7d7
-F test/analyze3.test fca2a9de0017becfdcc201647f03b1cfd5ba0e7b5b5c852936e4ec62780cde49
-F test/analyze4.test cdf88f3f72b0f0643a1ff6c730fc5af1e42464d47478d9fbac84c333f72c014e
+F test/analyze3.test 4440c4932247adb2b4e0c838f657c19dc7af4f56859255436dc4e855f39b9324
+F test/analyze4.test 293ec8ea21525f3435beaf9d6b1efb29e719415f03a0cd2a70589d59098e8464
 F test/analyze5.test fa5131952303ac4146aba101b116b9c8cb89e2637531c334a6df7f7d19dddc0d
-F test/analyze6.test 6c3f7df2996cb6872f355a6ac1eb6d5de00a5a9288214bad7ef25c97d9cc72dc
-F test/analyze7.test 6ef0b12369f61ddeadc7d8a705c40e6b52cb29f63de3a4c56581b510b46b5783
-F test/analyze8.test 36ce54947710bd44e4f9484e1ad07e725ef01a9d7078b417c1bc884356febe4d
-F test/analyze9.test 9fbf0e0101eef4f5dc149769aa14e10b76ee06e7c28598264b32173cd1999a54
-F test/analyzeC.test 489fe2ea3be3f17548e8dd895f1b41c9669b52de1b0861f5bffe6eec46eac710
-F test/analyzeD.test e50cd0b3e6063216cc0c88a1776e8645dc0bd65a6bb275769cbee33b7fd8d90c
-F test/analyzeE.test 8684e8ac5722fb97c251887ad97e5d496a98af1d
-F test/analyzeF.test 9e1a0537949eb5483642b1140a5c39e5b4025939024b935398471fa552f4dabb
-F test/analyzeG.test a48c0f324dd14de9a40d52abe5ca2637f682b9a791d2523dd619f6efa14e345b
+F test/analyze6.test 028f5bdfc9e5b5294768fa9a7185b8cd1d019aa7aab5b2f8ee42d7271d9a3b28
+F test/analyze7.test 079d17c495e396bdbd6cc6a083112788a6fbfb3b95c42e760e4270a53c9ead8f
+F test/analyze8.test 29ef237d8a59b39cc31c3310134fefe96a690b195e3deed5ecb652839089f15c
+F test/analyze9.test 162cd40d713310fbe7a63a5ecff5d3a013777d86809618838177d9b2af4dd09c
+F test/analyzeC.test 1111830ad355d29a294a5dda654dd5f6a8622c6a223a4f7b7b3d091df7a7a42b
+F test/analyzeD.test 485f621cfd2ef0a8f8ac79672586651bfa495bd899db50461bb4b558400ab3c1
+F test/analyzeE.test 69d130f9ba78c9853dcd5a18317e81f462a72d704cec0c4c30afb220213acd29
+F test/analyzeF.test 40b5cc3ad7b10e81020d7ca86f1417647ecfae7477cfd88acc5aa7ae1068f949
+F test/analyzeG.test 9e1ae5c24a88761284e08f78dccb728c81641a7465009e461faae5d06a31eab2
 F test/analyzer1.test 459fa02c445ddbf0101a3bad47b34290a35f2e49
 F test/async.test 1d0e056ba1bb9729283a0f22718d3a25e82c277b
 F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b
@@ -685,18 +685,18 @@ F test/atrc.c c388fac43dbba05c804432a7135ae688b32e8f25818e9994ffba4b64cf60c27c
 F test/attach.test 54f8e49e88d0de48f6428267a678465863d2b8f72320612f35bd5c02e240bc2f
 F test/attach2.test 256bd240da1835fb8408dd59fb7ef71f8358c7a756c46662434d11d07ba3a0ce
 F test/attach3.test c59d92791070c59272e00183b7353eeb94915976
-F test/attach4.test aa05b1d8218b24eba5a7cccf4f224f514ba57ba705c9267f09d2bb63fed0eea1
+F test/attach4.test 00e754484859998d124d144de6d114d920f2ed6ca2f961e6a7f4183c714f885e
 F test/attachmalloc.test 12c4f028e570acf9e0a4b0b7fe6f536e21f3d5ebddcece423603d0569beaf438
 F test/auth.test 2154625c05bc79f0e0ea72cb2358395a8041243caa0fd7ce7617d50da4331794
 F test/auth2.test 9eb7fce9f34bf1f50d3f366fb3e606be5a2000a1
 F test/auth3.test db21405b95257c24d29273b6b31d0efc59e1d337e3d5804ba2d1fd4897b1ae49
 F test/autoanalyze1.test b9cc3f32a990fa56669b668d237c6d53e983554ae80c0604992e18869a0b2dec
 F test/autoinc.test 997d6f185f138229dc4251583a1d04816423dddc2fc034871a01aeb1d728cb39
-F test/autoindex1.test 96185415f5faacd5b8d7a7f505efddd5abb1f111d58338e9c0b1dc40b87cd3cc
+F test/autoindex1.test fe27af92eaf884bd9c38f94be3e8afa04ec494e5eefb189902026181a6175f5e
 F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df
-F test/autoindex3.test 2dd997d6590438b53e4f715f9278aa91c9299cf3f81246a0915269c35beb790e
+F test/autoindex3.test 2d13958a5617e987624a428d7aed91bf51f322b49b476e3573fadec697ce6da5
 F test/autoindex4.test 49d3cd791a9baa16fb461d7ea3de80d019a819cf
-F test/autoindex5.test a5d72fe8c217cc0ea356dc6fa06a282a8a3fc53aa807709d79dba07a8f248102
+F test/autoindex5.test 809c59d6bee9a5146bef0809a6a2a050f89b78f63c11db2b84a567403e7dd85a
 F test/autovacuum.test 0831cd34e14695d297187f7f6519265e3121c5b0a1720e548e86829e796129e9
 F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
 F test/avfs.test 0c3a38e03cccb0fc3127838462dc05dc3f4c1480d770c084b388304c25de3652
@@ -711,17 +711,17 @@ F test/backup_malloc.test 0c9abdf74c51e7bedb66d504cd684f28d4bd4027
 F test/badutf.test d5360fc31f643d37a973ab0d8b4fb85799c3169f
 F test/badutf2.test f310fd3b24a491b6b77bccdf14923b85d6ebcce751068c180d93a6b8ff854399
 F test/bc_common.tcl b5e42d80305be95697e6370e015af571e5333a1c
-F test/bestindex1.test 705b57d7f51d53ee5fd043dd9666236e1fc18f4d59abf51da0ea5ea1b4804947
-F test/bestindex2.test 9a0ccd320b6525eec3a706aae6cdab7e1b7b5abca75027e39f39f755e76e5928
-F test/bestindex3.test 7622e792ff2da16d262d3cea6ad914591ac4806d57ed128e6c940b7920b47b84
-F test/bestindex4.test 038e3d0789332f3f1d61474f9bbc9c6d08c6bd1783a978f31f38ad82688de601
+F test/bestindex1.test 2e92e046148b3f8a2be62af9c0f307413547a33677af0df159c0fcc76e5134a2
+F test/bestindex2.test 60266e2854055788459cbfd86cef575601eabe74a2c61faba72601739fea4398
+F test/bestindex3.test e061a6ed0f519beee037ba7e7a4c37f80c8a7e4a303e2559ed1f760e4b0235eb
+F test/bestindex4.test 82250e7dcc6d5b15244edc9d6554b1760583af1b8548c2a255a1c4f28e744c0e
 F test/bestindex5.test 67c1166131bb59f9e47c00118f7d432ca5491e6cae6ca3f87ca9db20103a78f9
 F test/bestindex6.test d856a9bb63d927493575823eed44053bc36251e241aa364e54d0f2a2d302e1d4
-F test/bestindex7.test f36ada201973d3022cf7afffffe08de9e58341996020e7a2df9a1d2f2be20132
-F test/between.test 68137a6e941c221417c15b6fe2d55f27bb1b6ab48bdf9e2aa51efdd85bc53802
+F test/bestindex7.test a11348824aed0de2bb9030f092636929000cd72882bdf919adacc3792f67ccbd
+F test/between.test b9a65fb065391980119e8a781a7409d3fcf059d89968279c750e190a9a1d5263
 F test/bigfile.test aa74f4e5db51c8e54a1d9de9fa65d01d1eb20b59
 F test/bigfile2.test 1b489a3a39ae90c7f027b79110d6b4e1dbc71bfc
-F test/bigmmap.test e906cf9729d7c362270ffe9fa6471f4c39c28ba83f0f77fb795e1b4d38a22ba0
+F test/bigmmap.test 591bcf0563dd5e87df7f05b689eaf017b136d6637f1e3f16a7705fe0c6bf6a78
 F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
 F test/bigsort.test 8299fa9298f4f1e02fc7d2712e8b77d6cd60e5a2
 F test/bind.test 1e136709b306f7ed3192d349c2930d89df6ab621654ad6f1a72381d3fe76f483
@@ -740,7 +740,7 @@ F test/btree01.test e08b3613540145b353f20c81cb18ead54ff12e0f
 F test/btree02.test 7555a5440453d900410160a52554fe6478af4faf53098f7235f1f443d5a1d6cc
 F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
 F test/busy.test 510dc6daaad18bcbbc085bcc6217d6dc418def5e73f72ce1475eea0cb7834727
-F test/busy2.test 0a1633fef7987fc8ea25ed5838f7eef2f08fc6d2a3dcc77d23e6402e53946a7a
+F test/busy2.test dbfb61b3265e7a962d3bcd32cd542bbe3d7801edbda6438d35af5aa707cae981
 F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
 F test/cacheflush.test af25bb1509df04c1da10e38d8f322d66eceedf61
 F test/cachespill.test 895997f84a25b323b166aecb69baab2d6380ea98f9e0bcc688c4493c535cfab9
@@ -772,7 +772,7 @@ F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
 F test/collateB.test 1e68906951b846570f29f20102ed91d29e634854ee47454d725f2151ecac0b95
 F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1
 F test/colname.test 87ad5458bb8709312dac0d6755fd30e8e4ca83298d0a9ef6e5c24277a3c3390e
-F test/columncount.test eff33d402a7b0fde0a52a1920d238af200ca573327021e0ce3b7e5688de41449
+F test/columncount.test d86fb6307261186370698962790ad2088ed419e4a4e823512b502f17d443b1b7
 F test/conflict.test ac0667090f66130ac77d5fb764655558ca6600dd6d88f670ca9123b61c448337
 F test/conflict2.test 5557909ce683b1073982f5d1b61dfb1d41e369533bfdaf003180c5bc87282dd1
 F test/conflict3.test 81865d9599609aca394fb3b9cd5f561d4729ea5b176bece3644f6ecb540f88ac
@@ -800,10 +800,10 @@ F test/corruptK.test 5b4212fe346699831c5ad559a62c54e11c0611bdde1ea8423a091f9c01a
 F test/corruptL.test 22589f503602cc5984e80f27f46c4de2134f24f1515ba2440513c377cb692258
 F test/corruptM.test 7d574320e08c1b36caa3e47262061f186367d593a7e305d35f15289cc2c3e067
 F test/corruptN.test 781c5f26a2d8918f03d45ac4968a738031eeb113a4b153c7588756d9b09c7b04
-F test/cost.test 1d156ce9858780a966c062694687afe0343a0ed12d081d071fb57027e726bafc
-F test/count.test e0699a15712bc2a4679d60e408921c2cce7f6365a30340e790c98e0f334a9c77
+F test/cost.test b11cdbf9f11ffe8ef99c9881bf390e61fe92baf2182bad1dbe6de59a7295c576
+F test/count.test 5364003488249957750a5f15ee42ca1cd7b100b1131c2dc71fff266a1250bf55
 F test/countofview.test e17d6e6688cf74f22783c9ec6e788c0790ee4fbbaee713affd00b1ac0bb39b86
-F test/coveridxscan.test 5ec98719a2e2914e8908dc75f7247d9b54a26df04625f846ac7900d5483f7296
+F test/coveridxscan.test f35c7208dedc4f98e471c569df64c0f95a49f6e072d8dc7c8f99bdee2697de1b
 F test/crash.test fb9dc4a02dcba30d4aa5c2c226f98b220b2b959f
 F test/crash2.test 5b14d4eb58b880e231361d3b609b216acda86651
 F test/crash3.test 8f5de9d32ab9ab95475a9efe7f47a940aa889418
@@ -850,12 +850,12 @@ F test/e_blobclose.test 4b3c8c60c2171164d472059c73e9f3c1844bb66d
 F test/e_blobopen.test e95e1d40f995056f6f322cd5e1a1b83a27e1a145
 F test/e_blobwrite.test f87ff598b67af5b3ec002a8d83e804dc8d23808e88cf0080c176612fc9ffce14
 F test/e_changes.test fd66105385153dbf21fdb35eb8ef6c3e1eade579
-F test/e_createtable.test 7107f5deda2324ea12dbf105044dc9265195401e9dbb3eead6a2c1a3da4bb5b7
+F test/e_createtable.test 7997c0106c181243e0ac7db7ba8b9ae7233d0bfb0188605650322a7a02ea326e
 F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
 F test/e_droptrigger.test 235c610f8bf8ec44513e222b9085c7e49fad65ad0c1975ac2577109dd06fd8fa
 F test/e_dropview.test 74e405df7fa0f762e0c9445b166fe03955856532e2bb234c372f7c51228d75e7
 F test/e_expr.test 6ba7a51ece7b3e7fc145f14f924eed25ebb5a24e7b8596c78f3838d372cf0385
-F test/e_fkey.test a2907f749cccd0b2c30d8576b673002eebdcc1fc9964bae61e5117b1d54733e2
+F test/e_fkey.test 351c7b989e5aefcc339ef5fc78dc4738442bd247a392cd67d81c2881000c369e
 F test/e_fts3.test 17ba7c373aba4d4f5696ba147ee23fd1a1ef70782af050e03e262ca187c5ee07
 F test/e_insert.test f02f7f17852b2163732c6611d193f84fc67bc641fb4882c77a464076e5eba80e
 F test/e_reindex.test 2b0e29344497d9a8a999453a003cb476b6b1d2eef2d6c120f83c2d3a429f3164
@@ -875,15 +875,15 @@ F test/enc.test 9a7be5479da985381d740b15f432800f65e2c87029ee57a318f42cb2eb43763a
 F test/enc2.test 848bf05f15b011719f478dddb7b5e9aea35e39e457493cba4c4eef75d849a5ec
 F test/enc3.test 6807f7a7740a00361ca8d0ccd66bc60c8dc5f2b6
 F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
-F test/eqp.test 84879b63e3110552bf8ce648a3507dc3ceb72109ecec83c2aef0db37a27f6382
+F test/eqp.test bfe979eb1f4b8ab7a3bd7db6d16c2e6c6be0e5a3aada2227716f3fd3a9d76b69
 F test/errmsg.test eae9f091eb39ce7e20305de45d8e5d115b68fa856fba4ea6757b6ca3705ff7f9
 F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
 F test/exclusive.test 7ff63be7503990921838d5c9f77f6e33e68e48ed1a9d48cd28745bf650bf0747
 F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
 F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
 F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
-F test/exists2.test 3e5726d6a67ebd4bd3466db58be424c09156c1f276c7594abb260cbf6ad494d3
-F test/existsfault.test 74f7edc713f5a335e7ff47adf503067bf05c6f8630f88b2a19c24f0fa5486ab8
+F test/exists2.test fe260729c01a386b8df0999621ecd2cc16a28bb870979b3f84922be11978f0f2
+F test/existsfault.test 72a0036c1424d9204d49f4d976c3277a1b8bb2eed3c67aa124ba2df2f1331c7c
 F test/expr.test 26cd01e8485bc48c8aa6a1add598e9ce1e706b4eb4f3f554e0b0223022e8c2cf
 F test/expr2.test c27327ae9c017a7ff6280123f67aff496f912da74d78c888926d68b46ec75fd8
 F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
@@ -960,7 +960,7 @@ F test/fts3an.test a49ccadc07a2f7d646ec1b81bc09da2d85a85b18
 F test/fts3ao.test 266989148fec6d9f1bb6c5382f7aa3dcea0e9cd444576e28dd2b9287ac7dd220
 F test/fts3atoken.test dc2078ce464914efe3a8dfc545dd034a0fc14f2ab425c240471d5a5f1c721400
 F test/fts3auto.test 649aa4c198d7acc5cd6355e19ee073d051c40d9e88a43fc3d88af46bdf3e99d5
-F test/fts3aux1.test 7a170e172afdbceb67f5baa05941fd4fbf56af42f61daa3d140f4b4bf4cb68f6
+F test/fts3aux1.test 1880eaa75c586cd10f53080479a2b819b3915ae7ce55c4e0ba8f1fe05ac0a6a7
 F test/fts3aux2.test 2459e7fa3e22734aed237d1e2ae192f5541c4d8b218956ad2d90754977bf907f
 F test/fts3b.test c15c4a9d04e210d0be67e54ce6a87b927168fbf9c1e3faec8c1a732c366fd491
 F test/fts3c.test fc723a9cf10b397fdfc2b32e73c53c8b1ec02958
@@ -971,7 +971,7 @@ F test/fts3corrupt2.test e318f0676e5e78d5a4b702637e2bb25265954c08a1b1e4aaf93c788
 F test/fts3corrupt3.test 0d5b69a0998b4adf868cc301fc78f3d0707745f1d984ce044c205cdb764b491f
 F test/fts3corrupt4.test b71512ec391d39da96d60d01959e4e9f20d4237a964a94abcf5f5a2ad28378c1
 F test/fts3corrupt5.test 0549f85ec4bd22e992f645f13c59b99d652f2f5e643dac75568bfd23a6db7ed5
-F test/fts3corrupt6.test d5896a8d389bd824457772dc1e2d2023cd5c5cf8e42733607b5d632103018d8b
+F test/fts3corrupt6.test d274f139ec173392002c768631f404fefc007ae02ffa1b03d8cbd096c3fc00f9
 F test/fts3cov.test 7eacdbefd756cfa4dc2241974e3db2834e9b372ca215880e00032222f32194cf
 F test/fts3d.test 2bd8c97bcb9975f2334147173b4872505b6a41359a4f9068960a36afe07a679f
 F test/fts3defer.test f4c20e4c7153d20a98ee49ee5f3faef624fefc9a067f8d8d629db380c4d9f1de
@@ -988,7 +988,7 @@ F test/fts3fault.test 798e45af84be7978ca33d5bdc94246eb44724db24174b5d8e9b1ac46c5
 F test/fts3fault2.test 6a17a11d8034b1c4eca9f3091649273d56c49ff049e2173df8060f94341e9da0
 F test/fts3first.test dbdedd20914c8d539aa3206c9b34a23775644641
 F test/fts3fuzz001.test e3c7b0ce9b04cc02281dcc96812a277f02df03cd7dc082055d87e11eb18aaf56
-F test/fts3join.test 949b4f5ae3ae9cc2423cb865d711e32476bdb205ab2be923fdf48246e4a44166
+F test/fts3join.test b285c919559af5b093c51abb2c07ce7ec0156dbc9573f444b78dabd9f3040db2
 F test/fts3malloc.test b0e4c133b8d61d4f6d112d8110f8320e9e453ef6
 F test/fts3matchinfo.test aa66cc50615578b30f6df9984819ae5b702511cf8a94251ec7c594096a703a4a
 F test/fts3matchinfo2.test 00144e841704b8debfcdf6097969cd9f2a1cf759e2203cda42583648f2e6bf58
@@ -997,12 +997,12 @@ F test/fts3near.test 7e3354d46f155a822b59c0e957fd2a70c1d7e905
 F test/fts3offsets.test b85fd382abdc78ebce721d8117bd552dfb75094c
 F test/fts3prefix.test fa794eaab0bdae466494947b0b153d7844478ab2
 F test/fts3prefix2.test e1f0a822ca661dced7f12ce392e14eaf65609dce
-F test/fts3query.test ca033ff2ebcc22c69d89032fb0bc1850997d31e7e60ecd26440796ba1654e78f
+F test/fts3query.test 45806a302921b245a9dba5d85c9d51fb98b3f137eea6e6bf6eae4883e041ab72
 F test/fts3rank.test cd99bc83a3c923c8d52afd90d86979cf05fc41849f892faeac3988055ef37b99
 F test/fts3rnd.test 1320d8826a845e38a96e769562bf83d7a92a15d0
 F test/fts3shared.test 57e26a801f21027b7530da77db54286a6fe4997e
 F test/fts3snippet.test 0887196d67cffbe365edde535b95ecc642a532ce8551ccd9a73aab5999c3ffae
-F test/fts3snippet2.test 2dabb5889eda4c9980aad325e688b470781f97ce7c0fca0db125616fae0a2cdd
+F test/fts3snippet2.test e79afeb1f673713f96d7fc5655726081975399d11e659d15553207be43301dc4
 F test/fts3sort.test ed34c716a11cc2009a35210e84ad5f9c102362ca
 F test/fts3tok1.test a663f4cac22a9505400bc22aacb818d7055240409c28729669ea7d4cc2120d15
 F test/fts3tok_err.test 52273cd193b9036282f7bacb43da78c6be87418d
@@ -1029,7 +1029,7 @@ F test/fts4record.test a48508f69a84c9287c8019d3a1ae712f5730d8335ffaf8e2101e691d0
 F test/fts4rename.test 2e0565ffd92b2c51f1a757df0b8f2ca30537197106fec09e943919801d173692
 F test/fts4umlaut.test fcaca4471de7e78c9d1f7e8976e3e8704d7d8ad979d57a739d00f3f757380429
 F test/fts4unicode.test 82a9c16b68ba2f358a856226bb2ee02f81583797bc4744061c54401bf1a0f4c9
-F test/fts4upfrom.test 8df5acb6e10ad73f393d1add082b042ab1db72567888847d098152121e507b34
+F test/fts4upfrom.test f25835162c989dffd5e2ef91ec24c4848cc9973093e2d492d1c7b32afac1b49d
 F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
 F test/func.test f673822636fb8ed618dd2b80230d16e495d19c8f2e2e7d6c22e93e2b3de097ad
 F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
@@ -1063,7 +1063,7 @@ F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98
 F test/having.test a89236dd8d55aa50c4805f82ac9daf64d477a44d712d8209c118978d0ca21ec9
 F test/hexlit.test 4a6a5f46e3c65c4bf1fa06f5dd5a9507a5627751
 F test/hidden.test 23c1393a79e846d68fd902d72c85d5e5dcf98711
-F test/hook.test fa54fa8afc842ae375f10c1f9fc0014fa59789052fc30c9eae19811fa3afa009
+F test/hook.test 55b6d605d06dadbb04416eae8ad79889aea3521d119c87f04353c25f9c1450a4
 F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
 F test/icu.test 716a6b89fbabe5cc63e0cd4c260befb08fd7b9d761f04d43669233292f0753b1
 F test/ieee754.test b0945d12be7d255f3dfa18e2511b17ca37e0edd2b803231c52d05b86c04ab26e
@@ -1071,7 +1071,7 @@ F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
 F test/in.test 688ed2011d922d83141a45af431601738674a4c0bdde34b6351f688b82a169b3
 F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
 F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
-F test/in4.test 64ac9c767ac5af562f066a40163d4202f8fa3be05d264ec65d6258e74606b30c
+F test/in4.test cd08375ba470b248c3dc4ab30fd5dbcb682deafe3862d8249ba0ad6a11dd25ea
 F test/in5.test b32ce7f4a93f44c5dee94af16886d922cc16ebe33c8e1765c73d4049d0f4b40f
 F test/in6.test 8562d0945195cab3cc4ab3794e9118e72cb44c43f785c2b04d48a9d06ca6b4ec
 F test/incrblob.test c9b96afc292aeff43d6687bcb09b0280aa599822
@@ -1090,13 +1090,13 @@ F test/index2.test f835d5e13ca163bd78c4459ca15fd2e4ed487407
 F test/index3.test 51685f39345462b84fcf77eb8537af847fdf438cc96b05c45d6aaca4e473ade0
 F test/index4.test ab92e736d5946840236cd61ac3191f91a7856bf6
 F test/index5.test 8621491915800ec274609e42e02a97d67e9b13e7
-F test/index6.test f172653b35b20233e59200e8b92a76db61bf7285437bf777b93b306ba26a47e7
-F test/index7.test b8a0ba2110fd517bb48c4e76d26d60f1ab2ed9e257b18d71f820d7e71e9f8570
-F test/index8.test bc2e3db70e8e62459aaa1bd7e4a9b39664f8f9d7
+F test/index6.test 880858a65d8686120fe9a8971a4d82b429cc206fe7fd525b8b2b55451c74d82d
+F test/index7.test b238344318e0b4e42126717f6554f0e7dfd0b39cecad4b736039b43e1e3b6eb3
+F test/index8.test caa097735c91dbc23d8a402f5e63a2a03c83840ba3928733ed7f9a03f8a912a3
 F test/index9.test 0aa3e509dddf81f93380396e40e9bb386904c1054924ba8fa9bcdfe85a8e7721
-F test/indexedby.test a3ca11f0819a9279619099f36b624bcaa315f7a1ed65c3ed2219c2a944683d2c
-F test/indexexpr1.test 284e119999d132cc8bf37735a928c9859b28e8e295d02b7a6a4f93977c7f9ba5
-F test/indexexpr2.test dba11dbb0a58fcba4cd694f46b4004976123b81b0501f525d43c9be59f0207b1
+F test/indexedby.test f21eca4f7a6ffe14c8500a7ad6cd53166666c99e5ccd311842a28bc94a195fe0
+F test/indexexpr1.test 7e0e7a33acb4d9b3524398e6ce90cc05c26603fabbaf3062083a036c8874bc12
+F test/indexexpr2.test 2c7abe3c48f8aaa5a448615ab4d13df3662185d28419c00999670834a3f0b484
 F test/indexfault.test 98d78a8ff1f5335628b62f886a1cb7c7dac1ef6d48fa39c51ec871c87dce9811
 F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
 F test/insert.test 4e3f0de67aac3c5be1f4aaedbcea11638f1b5cdc9a3115be14d19aa9db7623c6
@@ -1110,7 +1110,7 @@ F test/instrfault.test 95e28efade652e6d51ae11b377088fe523a581a07ec428009e152a4dd
 F test/intarray.test bb976b0b3df0ebb6a2eddfb61768280440e672beba5460ed49679ea984ccf440
 F test/interrupt.test 16ea879ec728cb76414c148c5f24afd5d1f91054
 F test/interrupt2.test e4408ca770a6feafbadb0801e54a0dcd1a8d108d
-F test/intpkey.test ac71107a49a06492b69b82aafaf225400598d3c8
+F test/intpkey.test aee694afed1a65c86c4e69ad030224b3fc268113d00685234d40079fca16bad3
 F test/intreal.test 2a87e85a5949bd55e41ef04c58f5800587c5380bdbc559ff1c79b614b0e6a533
 F test/io.test f95bca1783b01ea7761671560d023360d2dfa4cc
 F test/ioerr.test 470fcc78e9cd352d162baf782fe301ea807d764241f58a48fc58109c2dfcdb6b
@@ -1121,10 +1121,10 @@ F test/ioerr5.test 2edfa4fb0f896f733071303b42224df8bedd9da4
 F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b
 F test/istrue.test 9619a2d77580f676048aaff7a16a0bcfea2b96c6c660dfaded2e53c873418899
 F test/join.test 25da4f53523a4aa17c893134b47fba6aa4799bb33350517b157785878290e238
-F test/join2.test 21fc30e54ab35ed66bf51b89cec18729205497f5cc43c83bc042f96a73721593
+F test/join2.test 9bdc615841b91c97a16d68bad9508aea11fa0c6b34e5689847bcc4dac70e4990
 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
 F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
-F test/join5.test 3a96dc62f0b45402d7207e22d1993fe0c2fce1c57644a11439891dd62b990eb7
+F test/join5.test f418fccdfefa41f1659663463aa517431ddcf3e30ccbb80e64173b7d615a03f4
 F test/join6.test f809c025fa253f9e150c0e9afd4cef8813257bceeb6f46e04041228c9403cc2c
 F test/journal1.test c7b768041b7f494471531e17abc2f4f5ebf9e5096984f43ed17c4eb80ba34497
 F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
@@ -1142,9 +1142,9 @@ F test/kvtest.c feb4358fb022da8ebd098c45811f2f6507688bb6c43aa72b3e840df19026317b
 F test/lastinsert.test 42e948fd6442f07d60acbd15d33fb86473e0ef63
 F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
 F test/lemon-test01.y 58b764610fd934e189ffbb0bbfa33d171b9cb06019b55bdc04d090d6767e11d7
-F test/like.test 0b7b4765ca59d95a1f92dfab9e4d810c9fb8280b5edd6332a01340a20db9e0ed
+F test/like.test 35e83182beb4c730d50e0f9aff7613fb5cdf8ca9147a833a77290fa5b8ba9474
 F test/like2.test 3b2ee13149ba4a8a60b59756f4e5d345573852da
-F test/like3.test 03d1bdf848483b78d2cfd1db283d75c4ec2e37c8b8eccc006813f3978d78fbbd
+F test/like3.test a76e5938fadbe6d32807284c796bafd869974a961057bc5fc5a28e06de98745c
 F test/limit.test 350f5d03c29e7dff9a2cde016f84f8d368d40bcd02fa2b2a52fa10c4bf3cbfaf
 F test/limit2.test 9409b033284642a859fafc95f29a5a6a557bd57c1f0d7c3f554bd64ed69df77e
 F test/loadext.test faa4f6eed07a5aac35d57fdd7bc07f8fc82464cfd327567c10cf0ba3c86cde04
@@ -1179,7 +1179,7 @@ F test/mallocG.test 0ff91b65c50bdaba680fb75d87fe4ad35bb7934f
 F test/mallocH.test 79b65aed612c9b3ed2dcdaa727c85895fd1bfbdb
 F test/mallocI.test 6c23a71df077fa5d387be90e7e669c5b368ca38a
 F test/mallocJ.test b5d1839da331d96223e5f458856f8ffe1366f62e
-F test/mallocK.test 1f4b5efbf61715ab79b20b38739ff4b3d110ceb53f54e5db6da1f01c083707ab
+F test/mallocK.test 25897506da0098cea09b302ff432b0fb6d8002773c1e0fc9732aa8b444bfd455
 F test/mallocL.test fb311ff80afddf3b1a75e52289081f4754d901dc
 F test/mallocM.test 78bbe9d3da84a5c679123cdb40d7b2010b18fc46e13897e4f253c6ba6fbff134
 F test/malloc_common.tcl aac62499b76be719fac31e7a3e54a7fd53272e7f
@@ -1201,7 +1201,7 @@ F test/misc3.test cf3dda47d5dda3e53fc5804a100d3c82be736c9d
 F test/misc4.test 10cd6addb2fa9093df4751a1b92b50440175dd5468a6ec84d0386e78f087db0e
 F test/misc5.test c4aeaa0fa28faa08f2485309c38db4719e6cd1364215d5687a5b96d340a3fa58
 F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
-F test/misc7.test 7b4c88c1d5ea8c8b9d537d212c08a0343d345fdd5c789598692c1c0e60fbda69
+F test/misc7.test 747f376edb3ffef54248de1f880707b881a4193038e032c650f1cb54b56d8016
 F test/misc8.test 8782708f4c8a459591c3e8fe1215bd2048bffb4024b3df249e9b9ed407dc61ed
 F test/misuse.test 9e7f78402005e833af71dcab32d048003869eca5abcaccc985d4f8dc1d86bcc7
 F test/mjournal.test 28a08d5cb5fb5b5702a46e19176e45e964e0800d1f894677169e79f34030e152
@@ -1225,10 +1225,10 @@ F test/notify1.test 669b2b743618efdc18ca4b02f45423d5d2304abf
 F test/notify2.test 2ecabaa1305083856b7c39cf32816b612740c161
 F test/notify3.test 10ff25cde502e72a92053a2f215d64bece4ef934
 F test/notnull.test a37b663d5bb728d66fc182016613fb8e4a0a4bbf3d75b8876a7527f7d4ed3f18
-F test/notnull2.test 965a893619751255e59c911a8c58504b3174a3788b1458b7c7365b232209711b
-F test/notnullfault.test 6126e31300632070ca6021698393c7fcf61ab4791bc2aa1d6d704242c0fcd4f8
+F test/notnull2.test 9b09c3405f1dfaf8c1725fb16d815407a5ceb4bb5bc7300e7a506348b3e78cd9
+F test/notnullfault.test fc4bb7845582a2b3db376001ef49118393b1b11abe0d24adb03db057ee2b73d5
 F test/null.test b7ff206a1c60fe01aa2abd33ef9ea83c93727d993ca8a613de86e925c9f2bc6f
-F test/nulls1.test 82c5bc33148405f21205865abf13c786084438d573a4ac4e87e11b6091cde526
+F test/nulls1.test 7a5e4346ee4285034100b4cd20e6784f16a9d6c927e44ecdf10034086bbee9c9
 F test/numcast.test 5d126f7f581432e86a90d1e35cac625164aec4a1
 F test/numindex1.test 20a5450d4b056e48cd5db30e659f13347a099823
 F test/offset1.test f06b83657bcf26f9ce805e67450e189e282143b2
@@ -1236,7 +1236,7 @@ F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
 F test/optfuzz-db01.c 9f2fa80b8f84ebbf1f2e8b13421a4e0477fe300f6686fbd76cac1d2db66e0fdc
 F test/optfuzz-db01.txt 21f6bdeadc701cf11528276e2a55c70bfcb846ba42df327f979bd9e7b6ce7041
 F test/optfuzz.c 50e330304eb1992e15ddd11f3daaad9bcc0d9aaad09cb2bcc77f9515df2e88b1
-F test/orderby1.test 6bf0ce45cbfb1cf4779dd418ac5e8cf66abfa04de2c1d2edf1e0e85f1520d8f3
+F test/orderby1.test a4bba04b9c60a21e53486fbc173a596b29641a3b3a57a0f26a1cbef1360358e9
 F test/orderby2.test bc11009f7cd99d96b1b11e57b199b00633eb5b04
 F test/orderby3.test 8619d06a3debdcd80a27c0fdea5c40b468854b99
 F test/orderby4.test 4d39bfbaaa3ae64d026ca2ff166353d2edca4ba4
@@ -1295,18 +1295,18 @@ F test/releasetest.tcl fb76d8fcc95ac29d6356cd9e52b726ab9e43a24082897618dfbcb7c2b
 F test/releasetest_data.tcl 3d41ddb3f04f474ac9d925485da24ce6576ff0ebc4c7201c8a340bc09846c261
 F test/resetdb.test 8062cf10a09d8c048f8de7711e94571c38b38168db0e5877ba7561789e5eeb2b
 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
-F test/returning1.test 209b910c132cb2015bb1159f852c7124778004963c09095c42c3d2442110c56c
+F test/returning1.test ed4baff6a22d8fb0052dcace0181395fbd67d4629cb0ee194175a1cfd097f24d
 F test/rollback.test 06680159bc6746d0f26276e339e3ae2f951c64812468308838e0a3362d911eaa
-F test/rollback2.test bc868d57899dc6972e2b4483faae0e03365a0556941474eec487ae21d8d38bb6
+F test/rollback2.test 3f3a4e20401825017df7e7671e9f31b6de5fae5620c2b9b49917f52f8c160a8f
 F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
 F test/round1.test 768018b04522ca420b1aba8a24bd76091d269f3bce3902af3ec6ebcee41ab21e
 F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
 F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
 F test/rowid.test bfbd7b97d9267660be3c8f28507c4ed7f205196b8877c0db42df347c2e8845e3
-F test/rowvalue.test 6795850abf6243e96f09ef041919d1ea61713332237b60d01371c0fee73f6379
+F test/rowvalue.test 466efbb7bb93ca9f95d89f69c7c140aa52cc57ac6dfa7efba09ea4a9ab3cd9f0
 F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
 F test/rowvalue3.test 3068f508753af69884b12125995f023da0dbb256
-F test/rowvalue4.test 02e35f7762371c2f57ebd856aa056eac56cb27ef7715a0bb31eac1895a745356
+F test/rowvalue4.test 441e7e366ac6d939a3a95a574031c56ec2a854077a91d66eee5ff1d86cb5be58
 F test/rowvalue5.test c81c7d8cf36711ab37675ad7376084ae2a359cb6
 F test/rowvalue6.test d19b54feb604d5601f8614b15e214e0774c01087
 F test/rowvalue7.test c1cbdbf407029db01f87764097c6ac02a1c5a37efd2776eff32a9cdfdf6f2dba
@@ -1323,7 +1323,7 @@ F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
 F test/savepoint6.test f41279c5e137139fa5c21485773332c7adb98cd7
 F test/savepoint7.test cde525ea3075283eb950cdcdefe23ead4f700daa
 F test/savepointfault.test f044eac64b59f09746c7020ee261734de82bf9b2
-F test/scanstatus.test 874e35011779b07725a47dbf1dd6282b0ca04af7e028fb0b534ee544b571be42
+F test/scanstatus.test 049b8704919a9727887f7ab2939a9ba858fa27c5aef5a0625d7a0773c8dd3ad8
 F test/schema.test 5dd11c96ba64744de955315d2e4f8992e447533690153b93377dffb2a5ef5431
 F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
 F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
@@ -1341,11 +1341,11 @@ F test/select5.test df9ec0d218cedceb4fe7b63262025b547b50a55e59148c6f40b60ca25f1d
 F test/select6.test 319d45e414cdd321bf17cfacedaf19e3935ad64dac357c53f1492338c6e9b801
 F test/select7.test f659f231489349e8c5734e610803d7654207318f
 F test/select8.test 8c8f5ae43894c891efc5755ed905467d1d67ad5d
-F test/select9.test aebc2bb0c3bc44606125033cbcaac2c8d1f33a95
-F test/selectA.test 68de52409e45a3313d00b8461b48bef4fb729faf36ade9067a994eae55cc86f4
+F test/select9.test f7586b207ce2304ab80dc93d3146469a28fd4403621dd3a82d06644563d3c812
+F test/selectA.test 5a9ef0f36c0f2666eb5e998073a98fce90c2fd0aa63a79c462c80036e9e0926d
 F test/selectB.test 954e4e49cf1f896d61794e440669e03a27ceea25
 F test/selectC.test fec14c9015ed4ec941508bbc144f30b42e40ac34a4bb33001450369865dd0b75
-F test/selectD.test fc20452847a01775710090383cfb4423275d2f745fed61f34fbf37573ac0d214
+F test/selectD.test 6d1909b49970bf92f45ce657505befcef5fc7cbc13544e18103a316d32189bfb
 F test/selectE.test a8730ca330fcf40ace158f134f4fe0eb00c7edbf
 F test/selectF.test 21c94e6438f76537b72532fa9fd4710cdd455fc3
 F test/selectG.test 089f7d3d7e6db91566f00b036cb353107a2cca6220eb1cb264085a836dae8840
@@ -1378,11 +1378,11 @@ F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
 F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
 F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce
 F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329
-F test/skipscan1.test ed524bc86f27646b3a297f45d6557b55db338977b6838f8064b196b35848b31b
-F test/skipscan2.test 3eb703ce794f139e7b83567911046298bcde29606116727f9b700ce34f559d2d
+F test/skipscan1.test 1a9972e1dc15ca3887f306d3cd9a29679afb382eca0f3539f3b746f3c2ccaf68
+F test/skipscan2.test c588cb7ed947db724d300f2a0dc537dd2ad292b0f812641d8481bc0b95dd3f49
 F test/skipscan3.test ec5bab3f81c7038b43450e7b3062e04a198bdbb5
-F test/skipscan5.test 980875ad45d8aacfe7bdec7c288343520cd1d14e84befdcfe50c785f9e6c8709
-F test/skipscan6.test 0b4cd1b4ac9f84d91454df513c99a4932fa07e8f27b8049bea605068b3e34ac7
+F test/skipscan5.test 0672103fd2c8f96bd114133f356192b35ece45c794fe3677e1d9e5e3104a608e
+F test/skipscan6.test bddbb35dd335e2d21b7791a61e3b2e1f3255dc307ce80aa6fe19cc298e6feb13
 F test/snapshot.test a504f2e7009f512ef66c719f0ea1c55a556bdaf1e1312c80a04d46fc1a3e9632
 F test/snapshot2.test 8d6ff5dd9cc503f6e12d408a30409c3f9c653507b24408d9cd7195931c89bc54
 F test/snapshot3.test 8744313270c55f6e18574283553d3c5c5fe4c5970585663613a0e75c151e599b
@@ -1470,7 +1470,7 @@ F test/tkt-2d1a5c67d.test be1326f3061caec85085f4c9ee4490561ca037c0
 F test/tkt-2ea2425d34.test 1cf13e6f75d149b3209a0cb32927a82d3d79fb28
 F test/tkt-31338dca7e.test 6fb8807851964da0d24e942f2e19c7c705b9fb58
 F test/tkt-313723c356.test 4b306ad45c736cedf2f5221f6155b92143244b6d
-F test/tkt-385a5b56b9.test 5204a7cba0e28c99df0acbf95af5e1af4d32965a7a14de6eccebf949607618b1
+F test/tkt-385a5b56b9.test 81d7c8ef2d2a378323ba2190c1f02f91022fdff0d8d0b84c04954d02c85ef374
 F test/tkt-38cb5df375.test f3cc8671f1eb604d4ae9cf886ed4366bec656678
 F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
 F test/tkt-3a77c9714e.test 90e3e8455ee945a4076d4c44062b8845708af24a880355328fe7008f2047c9f0
@@ -1485,7 +1485,7 @@ F test/tkt-5e10420e8d.test 904d1687b3c06d43e5b3555bbcf6802e7c0ffd84
 F test/tkt-5ee23731f.test 9db6e1d7209dc0794948b260d6f82b2b1de83a9f
 F test/tkt-6bfb98dfc0.test 24780633627b5cfc0635a5500c2389ebfb563336
 F test/tkt-752e1646fc.test ea78d88d14fe9866bdd991c634483334639e13bf
-F test/tkt-78e04e52ea.test cb44d0f5e7940223be740a39913a1b9b9b30d7e4a17ed3349141f893bae1b8f2
+F test/tkt-78e04e52ea.test b731f2ab7d1c2482ac5152097da02ef4805a45147ba9498d3cd9da27072f34d1
 F test/tkt-7a31705a7e6.test 9e9c057b6a9497c8f7ba7b16871029414ccf6550e7345d9085d6d71c9a56bb6f
 F test/tkt-7bbfb7d442.test 7b2cd79c7a17ae6750e75ec1a7846712a69c9d18
 F test/tkt-80ba201079.test 105a721e6aad0ae3c5946d7615d1e4d03f6145b8
@@ -1504,7 +1504,7 @@ F test/tkt-a8a0d2996a.test 002e1cde8fc30c39611b52cf981c88200b858765748556822da72
 F test/tkt-b1d3a2e531.test 8f7576e41ca179289ee1a8fee28386fd8e4b0550
 F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0
 F test/tkt-b72787b1.test a95e8cdad0b98af1853ac7f0afd4ab27b77bf5f3
-F test/tkt-b75a9ca6b0.test ade89229d853a67a21bbd5e6e1e787a8f9d21f19908d1b7fca6bf3d4d5aa0767
+F test/tkt-b75a9ca6b0.test dc6a853c242f7d0326564ae32e9e5eb462b5e8d2bc5b01ea3b18fd24f8e5894b
 F test/tkt-ba7cbfaedc.test b4c0deccc12aeb55cfdb57935b16b5d67c5a9877
 F test/tkt-bd484a090c.test 60460bf946f79a79712b71f202eda501ca99b898
 F test/tkt-bdc6bbbb38.test fc38bb09bdd440e3513a1f5f98fc60a075182d7d
@@ -1570,7 +1570,7 @@ F test/tkt3346.test 6f67c3ed7db94dfc5df4f5f0b63809a1f611e01a
 F test/tkt3357.test 77c37c6482b526fe89941ce951c22d011f5922ed
 F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
 F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
-F test/tkt3442.test a1fc47c669e651d16494de3ff349bcb53281456f2ca02c8bc14220b6044bbfe8
+F test/tkt3442.test 6287173de5bb2d43693b1f822426018a209f9df49ce2f454808bac1771852330
 F test/tkt3457.test 5651e2cbb94645b677ec663160b9e192b87b7d365aecdfb24e19f749575a6fc2
 F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
 F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
@@ -1606,14 +1606,14 @@ F test/tkt3992.test f3e7d548ac26f763b47bc0f750da3d03c81071da
 F test/tkt3997.test a335fa41ca3985660a139df7b734a26ef53284bd
 F test/tkt4018.test 18dbc6617f7a4b90e938d1bd6d26ad18daafaf08
 F test/tokenize.test ce430a7aed48fc98301611429595883fdfcab5d7
-F test/tpch01.test 7c4eb8cdd79c568f46d344b3e789c9fdb8a766d112871352704861f3fca32a2a
+F test/tpch01.test 4479008f85f6f8f25f7ab2cb305d665752b4727fa28a8df3d8e0ad46520c62ff
 F test/trace.test a659a9862957f4789e37a92b3bf6d2caf5c86b02cdeefc41e850ae53acf6992a
 F test/trace2.test f5cb67ad3bc09e0c58e8cca78dfd0b5639259983
 F test/trace3.test ae2004df24b585fed9046cc0bae4601762bc6fc4aa321d475f1350bba5047f31
 F test/trans.test 45f6f9ab6f66a7b5744f1caac06b558f95da62501916906cf55586a896f9f439
 F test/trans2.test 62bd045bfc7a1c14c5ba83ba64d21ade31583f76
 F test/trans3.test 91a100e5412b488e22a655fe423a14c26403ab94
-F test/transitive1.test 293300f46916569f08875cdb2fe2134be2c27677
+F test/transitive1.test 239eec5343388983f112c16d666aa89960cd85302b6af6cd8408ce8edb7b3316
 F test/trigger1.test d30cd09ae8ac365a088f09daba583cc5c0b8fc7d4e1d70809d0b4be3bf6ae2ab
 F test/trigger2.test d15da46f7012832faf3e0c536b47024409d5fb1722d2bb77e29c06d96d704bb1
 F test/trigger3.test aa640bb2bbb03edd5ff69c055117ea088f121945
@@ -1630,7 +1630,7 @@ F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
 F test/triggerE.test 612969cb57a4ef792059ad6d01af0117e1ae862c283753ffcc9a6428642b22ee
 F test/triggerF.test 5d76f0a8c428ff87a4d5ed52da06f6096a2c787a1e21b846111dfac4123de3ad
 F test/triggerG.test 2b816093c91ba73c733cfa8aedcc210ad819d72a98b1da30768a3c56505233e9
-F test/triggerupfrom.test d25961fa70a99b6736193da7b49a36d8c1d28d56188f0be6406d4366315cd6e4
+F test/triggerupfrom.test d1f9e56090408115c522bee626cc33a2f3370f627a5e341d832589d72e3aa271
 F test/trustschema1.test 4e970aef0bfe0cee139703cc7209d0e0f07725d999b180ba50770f49edef1494
 F test/tt3_checkpoint.c 9e75cf7c1c364f52e1c47fd0f14c4340a9db0fe1
 F test/tt3_index.c 39eec10a35f57672225be4d182862152896dee4a
@@ -1649,14 +1649,14 @@ F test/unionvtabfault.test e8759f3d14fb938ce9657e2342db34aeac0fb9bc1692b0d1ebb00
 F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
 F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
 F test/unixexcl.test d936ba2b06794018e136418addd59a2354eeae97
-F test/unordered.test ffeea7747d5ba962a8009a20b7e53d68cbae05b063604c68702c5998eb50c981
+F test/unordered.test 0edaf3411d300693bca595897c5201421c6c5ec787990a1dfe2f7f60ae93f1e2
 F test/update.test e906ca7cb1dc6f52af1ea243e08f727edfa79f924c2691f2f9e72481f847310d
 F test/update2.test 67455bc61fcbcf96923c45b3bc4f87bc72be7d67575ad35f134906148c7b06d3
 F test/upfrom1.tcl 8859d9d437f03b44174c4524a7a734a391fd4526fcff65be08285dafc9dc9041
 F test/upfrom1.test d18f69f7c691bc791e7f31bf0e354eeff04cf2f44edc32d6b1928bad71697073
-F test/upfrom2.test 6ebd3be8c3fac984e89a177d823686f04605b512fc167392bce6d8ba2ba63325
-F test/upfrom3.test 7dab379d128e8dd7beb2055b295fb113c7ba93e8c2038f5ddb7a4a10f0ebb348
-F test/upfromfault.test 70ecf8eb85559727a487283f69374e3ae39879e994d8a2437c49d7c05ecb70c9
+F test/upfrom2.test f92e47bfc35e9410d3e8716ee626384e89ad026c55fd6148508ca9d707521673
+F test/upfrom3.test 6130f24ebf97f5ea865e5d2a14a2d543fe5428a62e87cc60f62d875e45c1f5f0
+F test/upfromfault.test 3a10075a0043f0c4fad6614b2c371f88a8ba5a4acab68b907438413865d6a8d6
 F test/upsert1.test 88f9e258c6a0eeeb85937b08831e8daad440ba41f125af48439e9d33f266fb18
 F test/upsert2.test 9c3cdbb1a890227f6504ce4b0e3de68f4cdfa16bb21d8641208a9239896c5a09
 F test/upsert3.test 88d7d590a1948a9cb6eac1b54b0642f67a9f35a1fc0f19b200e97d5d39e3179c
@@ -1731,34 +1731,34 @@ F test/walprotocol2.test 7d3b6b4bf0b12f8007121b1e6ef714bc99101fb3b48e46371df1db8
 F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
 F test/walro2.test 0e79dd15cbdb4f482c01ea248373669c732414a726b357d04846a816afafb768
 F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
-F test/walsetlk.test 11f7fe792fdce54cf09874dab824e0627f2eedecfb9f7983e325606ec5184e0c
+F test/walsetlk.test 3185bebc90557e0d611442c8d64f7a0cb7b06f8e156eea37a4a7358f722715be
 F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
 F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
 F test/walthread.test 14b20fcfa6ae152f5d8e12f5dc8a8a724b7ef189f5d8ef1e2ceab79f2af51747
 F test/walvfs.test bccb3e0d235ef85e276f491d34db32c9ada1ea67be8d9f10aabe7b30319ec656
 F test/wapp.tcl b440cd8cf57953d3a49e7ee81e6a18f18efdaf113b69f7d8482b0710a64566ec
 F test/wapptest.tcl 899594e25684861d5b0c0880fb012364def50ef8097041b8ddf74be5ba7fa270 x
-F test/where.test e713c0c64e3e6b062235e39a2f7e5508c517df16b63d69fd786e26bc7330b1c6
-F test/where2.test 478d2170637b9211f593120648858593bf2445a1
-F test/where3.test 2341a294e17193a6b1699ea7f192124a5286ca6acfcc3f4b06d16c931fbcda2c
+F test/where.test 4f7a3939e5190845ef42142031a1819070f65e065e6a840a09adc54dccfef01f
+F test/where2.test 03c21a11e7b90e2845fc3c8b4002fc44cc2797fa74c86ee47d70bd7ea4f29ed6
+F test/where3.test 5b4ffc0ac2ea0fe92f02b1244b7531522fe4d7bccf6fa8741d54e82c10e67753
 F test/where4.test 4a371bfcc607f41d233701bdec33ac2972908ba8
 F test/where5.test fdf66f96d29a064b63eb543e28da4dfdccd81ad2
 F test/where6.test 5da5a98cec820d488e82708301b96cb8c18a258b
-F test/where7.test 75722434c486ac9e74718caa6cce234f45ba34c0b6c0f9555b29eb8bb5f6ade1
+F test/where7.test ab41d53ce8f2a6919ea3d5b13cd1153c1375a8e3ddaa129b81781f9033981383
 F test/where8.test 461ca40265ed996a6305da99bb024b0e41602bb586acf544c08f95922358e49f
-F test/where9.test 8e3e0ff42cc17156f52361a1c012281550d0d632912fec92d1d6df74db7a8e6d
+F test/where9.test b1942ed1d4c4632ea99e135691371f33803428ee4092a462280338ab3347f916
 F test/whereA.test 9d1077b117f1b68d5f739d94f36956c36cf995eb87bb19b77b2e81af020edd20
 F test/whereB.test 0def95db3bdec220a731c7e4bec5930327c1d8c5
 F test/whereC.test cae295158703cb3fc23bf1a108a9ab730efff0f6
 F test/whereD.test c1c335e914e28b122e000e9310f02d2be83e1c9dbca2e29f46bd732703944d1b
-F test/whereE.test b3a055eef928c992b0a33198a7b8dc10eea5ad2f
-F test/whereF.test 3d9412b1199d3e2bed34fcb76b4c48d0bf4df95d27e3f8dd27b6f8b4716d0d89
-F test/whereG.test 77127a4d214bb21da3b5c695cf4106cd9e418c60d9c24471ba55d3772067cd35
+F test/whereE.test 0ac7e61c6225354a980666996539da154991b4325af943a25a9079079c82fb03
+F test/whereF.test 926b65519608e3f2aa28720822b9154fb5c7b13519dd78194f434a511ab3dac5
+F test/whereG.test 0a489c891a74500b3994266342785dc12e675ac55ad74935c7c1b70393edf82c
 F test/whereH.test e4b07f7a3c2f5d31195cd33710054c78667573b2
-F test/whereI.test a2874062140ed4aba9ffae76e6190a3df6fc73d1373fdfa8fd632945082a5364
-F test/whereJ.test 88287550f6ee604422403b053455b1ad894eeaa5c35d348532dfa1439286cb9a
-F test/whereK.test f8e3cf26a8513ecc7f514f54df9f0572c046c42b
-F test/whereL.test 1afe47227f093dc0547236491fb37529b7be9724b8575925a321001b80e6a23a
+F test/whereI.test c4bb7e2ca56d49bd8ab5c7bd085b8b83e353922b46904d68aefb3c7468643581
+F test/whereJ.test fc05e374cc9f2dc204148d6c06822c380ad388895fe97a6d335b94a26a08aecf
+F test/whereK.test 0270ab7f04ba5436fb9156d31d642a1c82727f4c4bfe5ba90d435c78cf44684a
+F test/whereL.test 7717caf61ff4b09d05ddd2978701c4cf5661408bd4dce31d38eff482f60f44f3
 F test/wherefault.test 1374c3aa198388925246475f84ad4cd5f9528864
 F test/wherelfault.test 9012e4ef5259058b771606616bd007af5d154e64cc25fa9fd4170f6411db44e3
 F test/wherelimit.test daa0fd9122c5745cc459ec40b8d3c16ce13ce8382b5b847e7cfff4b871260cbf
@@ -1786,20 +1786,20 @@ F test/windowB.test 6e601f8178ba8ba28b2f19e74fe613815084bb4a8d2ad942defc7d42e191
 F test/windowerr.tcl f5acd6fbc210d7b5546c0e879d157888455cd4a17a1d3f28f07c1c8a387019e0
 F test/windowerr.test a8b752402109c15aa1c5efe1b93ccb0ce1ef84fa964ae1cd6684dd0b3cc1819b
 F test/windowfault.test d543d46571b32d19f198cb04b6505747fabf3cc369970daae47074ee793612be
-F test/windowpushd.test 5b9c114e8173c3addacf58a0fcd941437b14649f2033700184479a13f188ad00
-F test/with1.test 780be387f01e290e768bdfd1827280f9e37ba37223eb4736aba386864fac5a94
+F test/windowpushd.test d8895d08870b7226f7693665bd292eb177e62ca06799184957b3ca7dc03067df
+F test/with1.test b231edbf0f7c1d94bc14365cd9f33e197b2f0aa16add927ee121649fce014c15
 F test/with2.test 000fb95f1f29dae868cea0f41505eb5126077d49eb967ff88f9ee46212ad8863
-F test/with3.test 2f1e05aef7aeef9a741cbf36deeb4be73003dc541921c3abc78becbbf5b7852d
+F test/with3.test e223b72a349a1f36561757d6bd918ec966ed200147f8d8293771487267ee4983
 F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
 F test/with5.test 6248213c41fab36290b5b73aa3f937309dfba337004d9d8434c3fabc8c7d4be8
-F test/with6.test 3001b59179cbdc26a8c67ff8f46944e3141fdece9ab064c49bbf08459b67b207
+F test/with6.test 3ac280f6ceb8ce493dca2b36a4038f486710445fb62f6bfbba43d04c991f63cf
 F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
 F test/without_rowid1.test e4034c0849ccc2e8bb749c69f15bd69bb9fcf8fe77e8d17ce02369604242fe83
 F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
 F test/without_rowid3.test 39ab0dd773eaa62e59b17093f875327630f54c4145458f6d2b053d68d4b2f67b
 F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
 F test/without_rowid5.test 89b1c587bd92a0590e440da33e7666bf4891572a
-F test/without_rowid6.test 8463b20098e9f75a501a9f17dfb42fffc79068eac0b2775fe56ef2281d2df45e
+F test/without_rowid6.test efbd7add62c59bf5ca97bf8da674e734e6a70ef979234e816166824b4d258f68
 F test/without_rowid7.test d7c59a93d726b55812d620f8f284e01904a5b85f9ee9eea8f2f68571a5e8c40e
 F test/wordcount.c d721a4b6fae93e6e33449700bce1686bc23257c27425bc3ef1599dc912adec66
 F test/writecrash.test f1da7f7adfe8d7f09ea79b42e5ca6dcc41102f27f8e334ad71539501ddd910cc
@@ -1910,7 +1910,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 d192d737755876293a2914fcb9a0d5efbe07f3cd281c038666ea5aa879c06321
-R 8ac03dd6ce9964e338a0be1a587d3ab0
+P 1fadd30525dbf22678ba014b78af3a0fb33047692f073b7c62a90a028081ac48
+R 7666c425ea77f28b35eec29e0104fd77
 U drh
-Z eccc7f04bdba355f6e2efe4a8c6f321e
+Z c0db795a2f90d970c03a8b0a7ba43e6f
diff --git a/manifest.uuid b/manifest.uuid
index 295052d3ce..3d885a72ae 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-1fadd30525dbf22678ba014b78af3a0fb33047692f073b7c62a90a028081ac48
\ No newline at end of file
+50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
\ No newline at end of file
diff --git a/src/printf.c b/src/printf.c
index 0fb3158e9b..48382143b1 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -864,21 +864,17 @@ void sqlite3_str_vappendf(
         if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
         pItem = va_arg(ap, SrcItem*);
         assert( bArgList==0 );
-        if( pItem->zDatabase ){
-          sqlite3_str_appendall(pAccum, pItem->zDatabase);
-          sqlite3_str_append(pAccum, ".", 1);
-        }
-        if( pItem->zName ){
+        if( pItem->zAlias ){
+          sqlite3_str_appendall(pAccum, pItem->zAlias);
+        }else if( pItem->zName ){
+          if( pItem->zDatabase ){
+            sqlite3_str_appendall(pAccum, pItem->zDatabase);
+            sqlite3_str_append(pAccum, ".", 1);
+          }
           sqlite3_str_appendall(pAccum, pItem->zName);
         }else if( pItem->pSelect ){
           sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
         }
-        if( flag_altform2 ){
-          if( pItem->zAlias ){
-            sqlite3_str_append(pAccum, " AS ", 4);
-            sqlite3_str_appendall(pAccum, pItem->zAlias );
-          }
-        }
         length = width = 0;
         break;
       }
diff --git a/src/select.c b/src/select.c
index 3dd944d9cd..cab90eb014 100644
--- a/src/select.c
+++ b/src/select.c
@@ -5782,7 +5782,7 @@ static void explainSimpleCount(
 ){
   if( pParse->explain==2 ){
     int bCover = (pIdx!=0 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pIdx)));
-    sqlite3VdbeExplain(pParse, 0, "SCAN TABLE %s%s%s",
+    sqlite3VdbeExplain(pParse, 0, "SCAN %s%s%s",
         pTab->zName,
         bCover ? " USING COVERING INDEX " : "",
         bCover ? pIdx->zName : ""
diff --git a/src/shell.c.in b/src/shell.c.in
index 980fa6e6f2..889ed0d165 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -5777,7 +5777,7 @@ static int lintFkeyIndexes(
     "  || fkey_collate_clause("
     "       f.[table], COALESCE(f.[to], p.[name]), s.name, f.[from]),' AND ')"
     ", "
-    "     'SEARCH TABLE ' || s.name || ' USING COVERING INDEX*('"
+    "     'SEARCH ' || s.name || ' USING COVERING INDEX*('"
     "  || group_concat('*=?', ' AND ') || ')'"
     ", "
     "     s.name  || '(' || group_concat(f.[from],  ', ') || ')'"
@@ -5797,7 +5797,7 @@ static int lintFkeyIndexes(
     "GROUP BY s.name, f.id "
     "ORDER BY (CASE WHEN ? THEN f.[table] ELSE s.name END)"
   ;
-  const char *zGlobIPK = "SEARCH TABLE * USING INTEGER PRIMARY KEY (rowid=?)";
+  const char *zGlobIPK = "SEARCH * USING INTEGER PRIMARY KEY (rowid=?)";
 
   for(i=2; i<nArg; i++){
     int n = strlen30(azArg[i]);
diff --git a/test/altermalloc3.test b/test/altermalloc3.test
index d84f6bbc94..d88f022563 100644
--- a/test/altermalloc3.test
+++ b/test/altermalloc3.test
@@ -37,4 +37,3 @@ do_faultsim_test 1 -prep {
 
 
 finish_test
-
diff --git a/test/altertab.test b/test/altertab.test
index 0ed8fe5962..f29458cb76 100644
--- a/test/altertab.test
+++ b/test/altertab.test
@@ -738,4 +738,3 @@ do_catchsql_test 24.2.1 {
 
 
 finish_test
-
diff --git a/test/analyze3.test b/test/analyze3.test
index 1f4a2722b0..7469c537c0 100644
--- a/test/analyze3.test
+++ b/test/analyze3.test
@@ -124,10 +124,10 @@ do_execsql_test analyze3-1.1.x {
 #
 do_eqp_test analyze3-1.1.2 {
   SELECT sum(y) FROM t1 WHERE x>200 AND x<300
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
 do_eqp_test analyze3-1.1.3 {
   SELECT sum(y) FROM t1 WHERE x>0 AND x<1100 
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 # 2017-06-26:  Verify that the SQLITE_DBCONFIG_ENABLE_QPSG setting disables
 # the use of bound parameters by STAT4
@@ -137,27 +137,27 @@ unset -nocomplain l
 unset -nocomplain u
 do_eqp_test analyze3-1.1.3.100 {
   SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
 set l 200
 set u 300
 do_eqp_test analyze3-1.1.3.101 {
   SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
 set l 0
 set u 1100
 do_eqp_test analyze3-1.1.3.102 {
   SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SCAN TABLE t1}
+} {SCAN t1}
 db cache flush
 sqlite3_db_config db ENABLE_QPSG 1
 do_eqp_test analyze3-1.1.3.103 {
   SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
 db cache flush
 sqlite3_db_config db ENABLE_QPSG 0
 do_eqp_test analyze3-1.1.3.104 {
   SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 do_test analyze3-1.1.4 {
   sf_execsql { SELECT sum(y) FROM t1 WHERE x>200 AND x<300 }
@@ -207,10 +207,10 @@ do_execsql_test analyze3-2.1.x {
 } {200 990}
 do_eqp_test analyze3-1.2.2 {
   SELECT sum(y) FROM t2 WHERE x>1 AND x<2
-} {SEARCH TABLE t2 USING INDEX i2 (x>? AND x<?)}
+} {SEARCH t2 USING INDEX i2 (x>? AND x<?)}
 do_eqp_test analyze3-1.2.3 {
   SELECT sum(y) FROM t2 WHERE x>0 AND x<99
-} {SCAN TABLE t2}
+} {SCAN t2}
 
 do_test analyze3-1.2.4 {
   sf_execsql { SELECT sum(y) FROM t2 WHERE x>12 AND x<20 }
@@ -259,10 +259,10 @@ do_execsql_test analyze3-1.3.x {
 } {99 1000}
 do_eqp_test analyze3-1.3.2 {
   SELECT sum(y) FROM t3 WHERE x>200 AND x<300
-} {SEARCH TABLE t3 USING INDEX i3 (x>? AND x<?)}
+} {SEARCH t3 USING INDEX i3 (x>? AND x<?)}
 do_eqp_test analyze3-1.3.3 {
   SELECT sum(y) FROM t3 WHERE x>0 AND x<1100
-} {SCAN TABLE t3}
+} {SCAN t3}
 
 do_test analyze3-1.3.4 {
   sf_execsql { SELECT sum(y) FROM t3 WHERE x>200 AND x<300 }
@@ -314,10 +314,10 @@ do_test analyze3-2.1 {
 } {}
 do_eqp_test analyze3-2.2 {
   SELECT count(a) FROM t1 WHERE b LIKE 'a%'
-} {SEARCH TABLE t1 USING INDEX i1 (b>? AND b<?)}
+} {SEARCH t1 USING INDEX i1 (b>? AND b<?)}
 do_eqp_test analyze3-2.3 {
   SELECT count(a) FROM t1 WHERE b LIKE '%a'
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 # Return the first argument if like_match_blobs is true (the default)
 # or the second argument if not
@@ -704,11 +704,11 @@ do_test analyze3-6.1 {
 
 do_eqp_test analyze3-6-3 {
   SELECT * FROM t1 WHERE a = 5 AND c = 13;
-} {SEARCH TABLE t1 USING INDEX i2 (c=?)}
+} {SEARCH t1 USING INDEX i2 (c=?)}
 
 do_eqp_test analyze3-6-2 {
   SELECT * FROM t1 WHERE a = 5 AND b > 'w' AND c = 13;
-} {SEARCH TABLE t1 USING INDEX i2 (c=?)}
+} {SEARCH t1 USING INDEX i2 (c=?)}
 
 #-----------------------------------------------------------------------------
 # 2015-04-20.
diff --git a/test/analyze4.test b/test/analyze4.test
index 9fc98aa8f2..e3b0d23f6f 100644
--- a/test/analyze4.test
+++ b/test/analyze4.test
@@ -38,7 +38,7 @@ do_test analyze4-1.0 {
 
   # Should choose the t1a index since it is more specific than t1b.
   db eval {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=5 AND b IS NULL}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 
 # Verify that the t1b index shows that it does not narrow down the
 # search any at all.
diff --git a/test/analyze6.test b/test/analyze6.test
index b6353f2668..807fec132a 100644
--- a/test/analyze6.test
+++ b/test/analyze6.test
@@ -61,7 +61,7 @@ do_test analyze6-1.0 {
 #
 do_test analyze6-1.1 {
   eqp {SELECT count(*) FROM ev, cat WHERE x=y}
-} {/*SCAN TABLE cat USING COVERING INDEX catx*SEARCH TABLE ev USING COVERING INDEX evy (y=?)*/}
+} {/*SCAN cat USING COVERING INDEX catx*SEARCH ev USING COVERING INDEX evy (y=?)*/}
 
 # The same plan is chosen regardless of the order of the tables in the
 # FROM clause.
@@ -70,8 +70,8 @@ do_eqp_test analyze6-1.2 {
   SELECT count(*) FROM cat, ev WHERE x=y
 } {
   QUERY PLAN
-  |--SCAN TABLE cat USING COVERING INDEX catx
-  `--SEARCH TABLE ev USING COVERING INDEX evy (y=?)
+  |--SCAN cat USING COVERING INDEX catx
+  `--SEARCH ev USING COVERING INDEX evy (y=?)
 }
 
 
@@ -86,26 +86,26 @@ do_test analyze6-2.1 {
     ANALYZE;
   }
   eqp {SELECT * FROM t201 WHERE z=5}
-} {/*SEARCH TABLE t201 USING INDEX t201z (z=?)*/}
+} {/*SEARCH t201 USING INDEX t201z (z=?)*/}
 do_test analyze6-2.2 {
   eqp {SELECT * FROM t201 WHERE y=5}
-} {/*SEARCH TABLE t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
+} {/*SEARCH t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
 do_test analyze6-2.3 {
   eqp {SELECT * FROM t201 WHERE x=5}
-} {/*SEARCH TABLE t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
+} {/*SEARCH t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
 do_test analyze6-2.4 {
   execsql {
     INSERT INTO t201 VALUES(1,2,3),(2,3,4),(3,4,5);
     ANALYZE t201;
   }
   eqp {SELECT * FROM t201 WHERE z=5}
-} {/*SEARCH TABLE t201 USING INDEX t201z (z=?)*/}
+} {/*SEARCH t201 USING INDEX t201z (z=?)*/}
 do_test analyze6-2.5 {
   eqp {SELECT * FROM t201 WHERE y=5}
-} {/*SEARCH TABLE t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
+} {/*SEARCH t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
 do_test analyze6-2.6 {
   eqp {SELECT * FROM t201 WHERE x=5}
-} {/*SEARCH TABLE t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
+} {/*SEARCH t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
 do_test analyze6-2.7 {
   execsql {
     INSERT INTO t201 VALUES(4,5,7);
@@ -115,12 +115,12 @@ do_test analyze6-2.7 {
     ANALYZE t201;
   }
   eqp {SELECT * FROM t201 WHERE z=5}
-} {/*SEARCH TABLE t201 USING INDEX t201z (z=?)*/}
+} {/*SEARCH t201 USING INDEX t201z (z=?)*/}
 do_test analyze6-2.8 {
   eqp {SELECT * FROM t201 WHERE y=5}
-} {/*SEARCH TABLE t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
+} {/*SEARCH t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
 do_test analyze6-2.9 {
   eqp {SELECT * FROM t201 WHERE x=5}
-} {/*SEARCH TABLE t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
+} {/*SEARCH t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
 
 finish_test
diff --git a/test/analyze7.test b/test/analyze7.test
index b3dba02563..53a80f6419 100644
--- a/test/analyze7.test
+++ b/test/analyze7.test
@@ -37,13 +37,13 @@ do_test analyze7-1.0 {
                     WHERE value BETWEEN 1 AND 256;
     EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;
   }
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test analyze7-1.1 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
 do_test analyze7-1.2 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
 
 # Run an analyze on one of the three indices.  Verify that this
 # effects the row-count estimate on the one query that uses that
@@ -53,20 +53,20 @@ do_test analyze7-2.0 {
   execsql {ANALYZE t1a;}
   db cache flush
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test analyze7-2.1 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
 do_test analyze7-2.2 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
 
 # Verify that since the query planner now things that t1a is more
 # selective than t1b, it prefers to use t1a.
 #
 do_test analyze7-2.3 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123 AND b=123}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 
 # Run an analysis on another of the three indices.  Verify  that this
 # new analysis works and does not disrupt the previous analysis.
@@ -75,40 +75,40 @@ do_test analyze7-3.0 {
   execsql {ANALYZE t1cd;}
   db cache flush;
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test analyze7-3.1 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
 do_test analyze7-3.2.1 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=?;}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
 ifcapable stat4 {
   # If ENABLE_STAT4 is defined, SQLite comes up with a different estimated
   # row count for (c=2) than it does for (c=?).
   do_test analyze7-3.2.2 {
     execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
-  } {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+  } {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
 } else {
   # If ENABLE_STAT4 is not defined, the expected row count for (c=2) is the
   # same as that for (c=?).
   do_test analyze7-3.2.3 {
     execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
-  } {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+  } {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
 }
 do_test analyze7-3.3 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123 AND b=123}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 
 ifcapable {!stat4} {
   do_test analyze7-3.4 {
     execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=123 AND b=123}
-  } {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+  } {/*SEARCH t1 USING INDEX t1b (b=?)*/}
   do_test analyze7-3.5 {
     execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123 AND c=123}
-  } {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+  } {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 }
 do_test analyze7-3.6 {
   execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=123 AND d=123 AND b=123}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=? AND d=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=? AND d=?)*/}
 
 finish_test
diff --git a/test/analyze8.test b/test/analyze8.test
index 7c61652e51..69605fd6f7 100644
--- a/test/analyze8.test
+++ b/test/analyze8.test
@@ -61,25 +61,25 @@ do_test 1.0 {
 #
 do_test 1.1 {
   eqp {SELECT * FROM t1 WHERE a=100 AND b=55}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
 do_test 1.2 {
   eqp {SELECT * FROM t1 WHERE a=99 AND b=55}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test 1.3 {
   eqp {SELECT * FROM t1 WHERE a=101 AND b=55}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test 1.4 {
   eqp {SELECT * FROM t1 WHERE a=100 AND b=56}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
 do_test 1.5 {
   eqp {SELECT * FROM t1 WHERE a=99 AND b=56}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test 1.6 {
   eqp {SELECT * FROM t1 WHERE a=101 AND b=56}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test 2.1 {
   eqp {SELECT * FROM t1 WHERE a=100 AND b BETWEEN 50 AND 54}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b>? AND b<?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b>? AND b<?)*/}
 
 # There are many more values of c between 0 and 100000 than there are
 # between 800000 and 900000.  So t1c is more selective for the latter
@@ -99,17 +99,17 @@ do_execsql_test 3.0 {
 } {50 376 32}
 do_test 3.1 {
   eqp {SELECT * FROM t1 WHERE b BETWEEN 30 AND 34 AND c BETWEEN 0 AND 100000}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b>? AND b<?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b>? AND b<?)*/}
 do_test 3.2 {
   eqp {SELECT * FROM t1
        WHERE b BETWEEN 30 AND 34 AND c BETWEEN 800000 AND 900000}
-} {/*SEARCH TABLE t1 USING INDEX t1c (c>? AND c<?)*/}
+} {/*SEARCH t1 USING INDEX t1c (c>? AND c<?)*/}
 do_test 3.3 {
   eqp {SELECT * FROM t1 WHERE a=100 AND c BETWEEN 0 AND 100000}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
 do_test 3.4 {
   eqp {SELECT * FROM t1
        WHERE a=100 AND c BETWEEN 800000 AND 900000}
-} {/*SEARCH TABLE t1 USING INDEX t1c (c>? AND c<?)*/}
+} {/*SEARCH t1 USING INDEX t1c (c>? AND c<?)*/}
 
 finish_test
diff --git a/test/analyze9.test b/test/analyze9.test
index 75a02653d1..a7f9b5deae 100644
--- a/test/analyze9.test
+++ b/test/analyze9.test
@@ -578,16 +578,16 @@ do_test 13.1 {
 } {}
 do_eqp_test 13.2.1 {
   SELECT * FROM t1 WHERE a='abc' AND rowid<15 AND b<12
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
 do_eqp_test 13.2.2 {
   SELECT * FROM t1 WHERE a='abc' AND rowid<'15' AND b<12
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
 do_eqp_test 13.3.1 {
   SELECT * FROM t1 WHERE a='abc' AND rowid<100 AND b<12
-} {/SEARCH TABLE t1 USING INDEX i2/}
+} {/SEARCH t1 USING INDEX i2/}
 do_eqp_test 13.3.2 {
   SELECT * FROM t1 WHERE a='abc' AND rowid<'100' AND b<12
-} {/SEARCH TABLE t1 USING INDEX i2/}
+} {/SEARCH t1 USING INDEX i2/}
 
 #-------------------------------------------------------------------------
 # Check also that affinities are taken into account when using stat4 data 
@@ -609,10 +609,10 @@ do_test 14.1 {
 } {}
 do_eqp_test 13.2.1 {
   SELECT * FROM t1 WHERE a='ott' AND b<10 AND c=1
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
 do_eqp_test 13.2.2 {
   SELECT * FROM t1 WHERE a='ott' AND b<'10' AND c=1
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
 
 #-------------------------------------------------------------------------
 # By default, 16 non-periodic samples are collected for the stat4 table.
@@ -1056,11 +1056,11 @@ do_eqp_test 23.1 {
   -- Formerly used index i41.  But i41 is not a covering index whereas
   -- the PRIMARY KEY is a covering index, and so as of 2017-10-15, the
   -- PRIMARY KEY is preferred.
-} {SEARCH TABLE t4 USING PRIMARY KEY (c=? AND b=? AND a<?)}
+} {SEARCH t4 USING PRIMARY KEY (c=? AND b=? AND a<?)}
 do_eqp_test 23.2 {
   SELECT * FROM t4 WHERE 
     (e=1 AND b='xyz' AND c='zyx' AND a<'JJJ') AND f<300
-} {SEARCH TABLE t4 USING INDEX i42 (f<?)}
+} {SEARCH t4 USING INDEX i42 (f<?)}
 
 do_execsql_test 24.0 {
   CREATE TABLE t5(c, d, b, e, a, PRIMARY KEY(a, b, c)) WITHOUT ROWID;
@@ -1106,25 +1106,25 @@ ifcapable stat4&&cte {
   # Term (b<?) is estimated at 25%. Better than (a<30) but not as
   # good as (a<20).
   do_eqp_test 25.2.1 { SELECT * FROM t6 WHERE a<30 AND b<? } \
-    {SEARCH TABLE t6 USING INDEX bb (b<?)}
+    {SEARCH t6 USING INDEX bb (b<?)}
   do_eqp_test 25.2.2 { SELECT * FROM t6 WHERE a<20 AND b<? } \
-    {SEARCH TABLE t6 USING INDEX aa (a<?)}
+    {SEARCH t6 USING INDEX aa (a<?)}
 
   # Term (b BETWEEN ? AND ?) is estimated at 1/64.
   do_eqp_test 25.3.1 { 
     SELECT * FROM t6 WHERE a BETWEEN 5 AND 10 AND b BETWEEN ? AND ? 
-  } {SEARCH TABLE t6 USING INDEX bb (b>? AND b<?)}
+  } {SEARCH t6 USING INDEX bb (b>? AND b<?)}
   
   # Term (b BETWEEN ? AND 60) is estimated to return roughly 15 rows -
   # 60 from (b<=60) multiplied by 0.25 for the b>=? term. Better than
   # (a<20) but not as good as (a<10).
   do_eqp_test 25.4.1 { 
     SELECT * FROM t6 WHERE a < 10 AND (b BETWEEN ? AND 60)
-  } {SEARCH TABLE t6 USING INDEX aa (a<?)}
+  } {SEARCH t6 USING INDEX aa (a<?)}
 
   do_eqp_test 25.4.2 { 
     SELECT * FROM t6 WHERE a < 20 AND (b BETWEEN ? AND 60)
-  } {SEARCH TABLE t6 USING INDEX bb (b>? AND b<?)}
+  } {SEARCH t6 USING INDEX bb (b>? AND b<?)}
 }
 
 #-------------------------------------------------------------------------
@@ -1180,7 +1180,7 @@ do_execsql_test 26.1.3 {
 #
 do_eqp_test 26.1.4 {
   SELECT * FROM t1 WHERE x = 10000 AND y < 50 AND z = 444;
-} {SEARCH TABLE t1 USING INDEX t1z (z=?)}
+} {SEARCH t1 USING INDEX t1z (z=?)}
 
 
 # This test - 26.2.* - tests that another manifestation of the same problem
@@ -1229,7 +1229,7 @@ do_execsql_test 26.2.1 {
 
 do_eqp_test 26.2.2 {
   SELECT * FROM t1 WHERE x='B' AND y>25 AND z=?;
-} {SEARCH TABLE t1 USING INDEX i1 (x=? AND y>?)}
+} {SEARCH t1 USING INDEX i1 (x=? AND y>?)}
 
 
 finish_test
diff --git a/test/analyzeC.test b/test/analyzeC.test
index 2a0a897810..2f43d57a1e 100644
--- a/test/analyzeC.test
+++ b/test/analyzeC.test
@@ -50,7 +50,7 @@ do_execsql_test 1.2 {
 do_execsql_test 1.3 {
   EXPLAIN QUERY PLAN
   SELECT c FROM t1 ORDER BY a;
-} {/.*SCAN TABLE t1 USING INDEX t1a.*/}
+} {/.*SCAN t1 USING INDEX t1a.*/}
 do_execsql_test 1.3x {
   EXPLAIN QUERY PLAN
   SELECT c FROM t1 ORDER BY a;
diff --git a/test/analyzeD.test b/test/analyzeD.test
index 9c7ed7586d..7a51785a1c 100644
--- a/test/analyzeD.test
+++ b/test/analyzeD.test
@@ -63,7 +63,7 @@ do_test 1.1 {
 #
 do_eqp_test 1.2 {
   SELECT * FROM t1 WHERE a=3001 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_c (c=?)}
+} {SEARCH t1 USING INDEX t1_c (c=?)}
 
 do_test 1.3 {
   execsql { DELETE FROM sqlite_stat1 }
@@ -78,7 +78,7 @@ do_test 1.3 {
 #
 do_eqp_test 1.4 {
   SELECT * FROM t1 WHERE a=3001 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_ab (a=?)}
+} {SEARCH t1 USING INDEX t1_ab (a=?)}
 
 do_test 1.5 {
   execsql { 
@@ -89,7 +89,7 @@ do_test 1.5 {
 
 do_eqp_test 1.6 {
   SELECT * FROM t1 WHERE a=13 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_c (c=?)}
+} {SEARCH t1 USING INDEX t1_c (c=?)}
 
 do_test 1.7 {
   execsql { DELETE FROM sqlite_stat1 }
@@ -102,6 +102,6 @@ do_test 1.7 {
 # gets this right, even without stat1 data.
 do_eqp_test 1.8 {
   SELECT * FROM t1 WHERE a=13 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_c (c=?)}
+} {SEARCH t1 USING INDEX t1_c (c=?)}
 
 finish_test
diff --git a/test/analyzeE.test b/test/analyzeE.test
index 66db1e122c..733b79367f 100644
--- a/test/analyzeE.test
+++ b/test/analyzeE.test
@@ -36,47 +36,47 @@ do_execsql_test analyzeE-1.0 {
 do_execsql_test analyzeE-1.1 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-1.2 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.3 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.4 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1 AND 500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.5 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.6 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.7 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>2500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.8 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1900
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.9 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1100
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-1.10 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1100
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-1.11 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1900
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 
 # Verify that everything works the same on a DESCENDING index.
 #
@@ -88,47 +88,47 @@ do_execsql_test analyzeE-2.0 {
 do_execsql_test analyzeE-2.1 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-2.2 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.3 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.4 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1 AND 500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.5 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.6 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.7 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>2500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.8 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1900
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.9 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1100
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-2.10 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1100
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
 do_execsql_test analyzeE-2.11 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1900
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 
 # Now do a range query on the second term of an ASCENDING index
 # where the first term is constrained by equality.
@@ -145,47 +145,47 @@ do_execsql_test analyzeE-3.0 {
 do_execsql_test analyzeE-3.1 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500 AND c=123;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-3.2 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.3 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.4 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1 AND 500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.5 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.6 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.7 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>2500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.8 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1900 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.9 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1100 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-3.10 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1100 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-3.11 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1900 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 
 # Repeat the 3.x tests using a DESCENDING index
 #
@@ -197,46 +197,46 @@ do_execsql_test analyzeE-4.0 {
 do_execsql_test analyzeE-4.1 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500 AND c=123;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-4.2 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.3 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.4 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 1 AND 500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.5 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.6 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.7 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>2500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.8 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1900 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.9 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a>1100 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 do_execsql_test analyzeE-4.10 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1100 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
 do_execsql_test analyzeE-4.11 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE a<1900 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
 
 finish_test
diff --git a/test/analyzeF.test b/test/analyzeF.test
index 143cecdf57..00107993eb 100644
--- a/test/analyzeF.test
+++ b/test/analyzeF.test
@@ -62,7 +62,7 @@ foreach {tn where idx} {
   11 "x = nullif('19', 0) AND y = nullif('4', 0)" {t1y (y=?)}
   12 "x = nullif('4', 0) AND y = nullif('19', 0)" {t1y (y=?)}
 } {
-  set res "SEARCH TABLE t1 USING INDEX $idx"
+  set res "SEARCH t1 USING INDEX $idx"
   do_eqp_test 1.$tn "SELECT * FROM t1 WHERE $where" $res
 }
 
@@ -92,7 +92,7 @@ foreach {tn where idx} {
   3 "x = nondet4() AND y = nondet19()"     {t1y (y=?)}
   4 "x = nondet19() AND y = nondet4()"     {t1y (y=?)}
 } {
-  set res "SEARCH TABLE t1 USING INDEX $idx"
+  set res "SEARCH t1 USING INDEX $idx"
   do_eqp_test 3.$tn "SELECT * FROM t1 WHERE $where" $res
 }
 
diff --git a/test/analyzeG.test b/test/analyzeG.test
index eb1853b1dc..4395925de3 100644
--- a/test/analyzeG.test
+++ b/test/analyzeG.test
@@ -57,7 +57,7 @@ do_execsql_test 1.0 {
 do_scan_order_test 1.1.1 {
   SELECT * FROM t1, t2 WHERE a=44 AND b=44;
 } {
-  {SCAN TABLE t1} {SCAN TABLE t2}
+  {SCAN t1} {SCAN TABLE t2}
 }
 do_scan_order_test 1.1.2 {
   SELECT * FROM t2, t1 WHERE a=44 AND b=44 
diff --git a/test/attach4.test b/test/attach4.test
index 87911814a0..9d54e7df57 100644
--- a/test/attach4.test
+++ b/test/attach4.test
@@ -135,4 +135,3 @@ do_execsql_test 2.2 {
 }
 
 finish_test
-
diff --git a/test/autoindex1.test b/test/autoindex1.test
index b08f8cfeb6..6b437f1867 100644
--- a/test/autoindex1.test
+++ b/test/autoindex1.test
@@ -183,18 +183,18 @@ do_eqp_test autoindex1-500.1 {
    WHERE t501.a IN (SELECT x FROM t502 WHERE y=?);
 } {
   QUERY PLAN
-  |--SEARCH TABLE t501 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH t501 USING INTEGER PRIMARY KEY (rowid=?)
   `--LIST SUBQUERY xxxxxx
-     `--SCAN TABLE t502
+     `--SCAN t502
 }
 do_eqp_test autoindex1-501 {
   SELECT b FROM t501
    WHERE t501.a IN (SELECT x FROM t502 WHERE y=t501.b);
 } {
   QUERY PLAN
-  |--SCAN TABLE t501
+  |--SCAN t501
   `--CORRELATED LIST SUBQUERY xxxxxx
-     `--SEARCH TABLE t502 USING AUTOMATIC COVERING INDEX (y=?)
+     `--SEARCH t502 USING AUTOMATIC COVERING INDEX (y=?)
 }
 do_eqp_test autoindex1-502 {
   SELECT b FROM t501
@@ -202,9 +202,9 @@ do_eqp_test autoindex1-502 {
      AND t501.a IN (SELECT x FROM t502 WHERE y=t501.b);
 } {
   QUERY PLAN
-  |--SEARCH TABLE t501 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH t501 USING INTEGER PRIMARY KEY (rowid=?)
   `--CORRELATED LIST SUBQUERY xxxxxx
-     `--SCAN TABLE t502
+     `--SCAN t502
 }
 
 # The following code checks a performance regression reported on the
@@ -277,13 +277,13 @@ do_eqp_test autoindex1-600a {
    ORDER BY x.registering_flock;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--SCAN TABLE sheep AS s
-  |  |--SEARCH TABLE flock_owner AS prev USING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date<?)
+  |--MATERIALIZE y
+  |  |--SCAN s
+  |  |--SEARCH prev USING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date<?)
   |  `--CORRELATED SCALAR SUBQUERY xxxxxx
-  |     `--SEARCH TABLE flock_owner AS later USING COVERING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date>? AND owner_change_date<?)
-  |--SCAN TABLE sheep AS x USING INDEX sheep_reg_flock_index
-  `--SEARCH SUBQUERY xxxxxx AS y USING AUTOMATIC COVERING INDEX (sheep_no=?)
+  |     `--SEARCH later USING COVERING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date>? AND owner_change_date<?)
+  |--SCAN x USING INDEX sheep_reg_flock_index
+  `--SEARCH y USING AUTOMATIC COVERING INDEX (sheep_no=?)
 }
 
 
@@ -294,7 +294,7 @@ do_eqp_test autoindex1-700a {
   SELECT a FROM t5 WHERE b=10 ORDER BY c;
 } {
   QUERY PLAN
-  |--SCAN TABLE t5
+  |--SCAN t5
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -413,7 +413,7 @@ do_execsql_test autoindex1-800 {
              JOIN raw_contacts ON (data.raw_contact_id=raw_contacts._id) 
              JOIN accounts ON (raw_contacts.account_id=accounts._id)
    WHERE mimetype_id=10 AND data14 IS NOT NULL;
-} {/SEARCH TABLE data .*SEARCH TABLE raw_contacts/}
+} {/SEARCH data .*SEARCH raw_contacts/}
 do_execsql_test autoindex1-801 {
   EXPLAIN QUERY PLAN
   SELECT * FROM 
@@ -421,7 +421,7 @@ do_execsql_test autoindex1-801 {
              JOIN raw_contacts ON (data.raw_contact_id=raw_contacts._id) 
              JOIN accounts ON (raw_contacts.account_id=accounts._id)
    WHERE mimetypes._id=10 AND data14 IS NOT NULL;
-} {/SEARCH TABLE data .*SEARCH TABLE raw_contacts/}
+} {/SEARCH data .*SEARCH raw_contacts/}
 
 # Another test case from an important user of SQLite.  The key feature of
 # this test is that the "aggindex" subquery should make use of an
diff --git a/test/autoindex3.test b/test/autoindex3.test
index 9dcf2491ff..824a82973b 100644
--- a/test/autoindex3.test
+++ b/test/autoindex3.test
@@ -74,8 +74,8 @@ do_execsql_test 210 {
 
 # At one point, SQLite was using the inferior plan:
 #
-#   0|0|1|SEARCH TABLE v USING INDEX ve (e>?)
-#   0|1|0|SEARCH TABLE u USING COVERING INDEX uab (ANY(a) AND b=?)
+#   0|0|1|SEARCH v USING INDEX ve (e>?)
+#   0|1|0|SEARCH u USING COVERING INDEX uab (ANY(a) AND b=?)
 #
 # on the basis that the real index "uab" must be better than the automatic
 # index. This is not right - a skip-scan is not necessarily better than an
@@ -85,8 +85,8 @@ do_eqp_test 220 {
   select count(*) from u, v where u.b = v.b and v.e > 34;
 } {
   QUERY PLAN
-  |--SEARCH TABLE v USING INDEX ve (e>?)
-  `--SEARCH TABLE u USING AUTOMATIC COVERING INDEX (b=?)
+  |--SEARCH v USING INDEX ve (e>?)
+  `--SEARCH u USING AUTOMATIC COVERING INDEX (b=?)
 }
 
 
diff --git a/test/autoindex5.test b/test/autoindex5.test
index 94e220328c..6dd553a7b4 100644
--- a/test/autoindex5.test
+++ b/test/autoindex5.test
@@ -102,7 +102,7 @@ do_eqp_test autoindex5-1.1 {
      AND ( sp.release = 'sid' OR sp.release = 'stretch' OR sp.release = 'jessie'
             OR sp.release = 'wheezy' OR sp.release = 'squeeze' )
   ORDER BY sp.name, st.bug_name, sp.release, sp.subrelease;
-} {SEARCH SUBQUERY * USING AUTOMATIC COVERING INDEX (bug_name=?)}
+} {SEARCH debian_cve USING AUTOMATIC COVERING INDEX (bug_name=?)}
 
 #-------------------------------------------------------------------------
 # Test that ticket [8a2adec1] has been fixed.
diff --git a/test/bestindex1.test b/test/bestindex1.test
index b97af11140..0d69469943 100644
--- a/test/bestindex1.test
+++ b/test/bestindex1.test
@@ -51,11 +51,11 @@ do_execsql_test 1.0 {
 
 do_eqp_test 1.1 {
   SELECT * FROM x1 WHERE a = 'abc'
-} {SCAN TABLE x1 VIRTUAL TABLE INDEX 555:eq!}
+} {SCAN x1 VIRTUAL TABLE INDEX 555:eq!}
 
 do_eqp_test 1.2 {
   SELECT * FROM x1 WHERE a IN ('abc', 'def');
-} {SCAN TABLE x1 VIRTUAL TABLE INDEX 555:eq!}
+} {SCAN x1 VIRTUAL TABLE INDEX 555:eq!}
 
 #-------------------------------------------------------------------------
 #
@@ -141,17 +141,17 @@ foreach {tn mode} {
 
   set plan(use) {
     QUERY PLAN
-    |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
+    |--SCAN t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
     `--USE TEMP B-TREE FOR ORDER BY
   }
   set plan(omit) {
     QUERY PLAN
-    |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
+    |--SCAN t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
     `--USE TEMP B-TREE FOR ORDER BY
   }
   set plan(use2) {
     QUERY PLAN
-    |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x
+    |--SCAN t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x
     `--USE TEMP B-TREE FOR ORDER BY
   }
 
diff --git a/test/bestindex2.test b/test/bestindex2.test
index c17665f6f5..81ed9ebf61 100644
--- a/test/bestindex2.test
+++ b/test/bestindex2.test
@@ -89,40 +89,40 @@ do_execsql_test 1.0 {
 
 do_eqp_test 1.1 {
   SELECT * FROM t1 WHERE a='abc'
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
 
 do_eqp_test 1.2 {
   SELECT * FROM t1 WHERE a='abc' AND b='def'
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:indexed(a=? AND b=?)}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:indexed(a=? AND b=?)}
 
 do_eqp_test 1.3 {
   SELECT * FROM t1 WHERE a='abc' AND a='def'
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
 
 do_eqp_test 1.4 {
   SELECT * FROM t1,t2 WHERE c=a
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
-  `--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 0:
+  `--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
 }
 
 do_eqp_test 1.5 {
   SELECT * FROM t1, t2 CROSS JOIN t3 WHERE t2.c = +t1.b AND t3.e=t2.d
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
-  |--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
-  `--SCAN TABLE t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 0:
+  |--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+  `--SCAN t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
 }
 
 do_eqp_test 1.6 {
   SELECT * FROM t1, t2, t3 WHERE t2.c = +t1.b AND t3.e = t2.d
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
-  |--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
-  `--SCAN TABLE t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
+  |--SCAN t1 VIRTUAL TABLE INDEX 0:
+  |--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+  `--SCAN t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
 }
 
 do_execsql_test 1.7.1 {
@@ -133,10 +133,10 @@ do_eqp_test 1.7.2 {
     WHERE t1.a = t2.c AND t1.b = t3.e
 } {
   QUERY PLAN
-  |--SCAN TABLE x1
-  |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
-  |--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
-  `--SCAN TABLE t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
+  |--SCAN x1
+  |--SCAN t1 VIRTUAL TABLE INDEX 0:
+  |--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+  `--SCAN t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
 }
 
 finish_test
diff --git a/test/bestindex3.test b/test/bestindex3.test
index 80038e2855..1ee3975f8b 100644
--- a/test/bestindex3.test
+++ b/test/bestindex3.test
@@ -79,11 +79,11 @@ do_execsql_test 1.0 {
 
 do_eqp_test 1.1 {
   SELECT * FROM t1 WHERE a LIKE 'abc';
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a LIKE ?}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:a LIKE ?}
 
 do_eqp_test 1.2 {
   SELECT * FROM t1 WHERE a = 'abc';
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a EQ ?}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:a EQ ?}
 
 do_eqp_test 1.3 {
   SELECT * FROM t1 WHERE a = 'abc' OR b = 'def';
@@ -91,9 +91,9 @@ do_eqp_test 1.3 {
   QUERY PLAN
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a EQ ?
+     |  `--SCAN t1 VIRTUAL TABLE INDEX 0:a EQ ?
      `--INDEX 2
-        `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:b EQ ?
+        `--SCAN t1 VIRTUAL TABLE INDEX 0:b EQ ?
 }
 
 do_eqp_test 1.4 {
@@ -102,9 +102,9 @@ do_eqp_test 1.4 {
   QUERY PLAN
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a LIKE ?
+     |  `--SCAN t1 VIRTUAL TABLE INDEX 0:a LIKE ?
      `--INDEX 2
-        `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:b EQ ?
+        `--SCAN t1 VIRTUAL TABLE INDEX 0:b EQ ?
 }
 
 do_execsql_test 1.5 {
@@ -155,9 +155,9 @@ ifcapable !icu {
     QUERY PLAN
     `--MULTI-INDEX OR
        |--INDEX 1
-       |  `--SEARCH TABLE t2 USING INDEX t2x (x>? AND x<?)
+       |  `--SEARCH t2 USING INDEX t2x (x>? AND x<?)
        `--INDEX 2
-          `--SEARCH TABLE t2 USING INDEX t2y (y=?)
+          `--SEARCH t2 USING INDEX t2y (y=?)
   }]
 }
 
diff --git a/test/bestindex4.test b/test/bestindex4.test
index e395012c4f..f90bf41e94 100644
--- a/test/bestindex4.test
+++ b/test/bestindex4.test
@@ -159,16 +159,16 @@ do_eqp_test 2.1 {
   SELECT * FROM t1, x1 WHERE x1.d=t1.x;
 } {
   QUERY PLAN
-  |--SCAN TABLE x1 VIRTUAL TABLE INDEX 0:
-  `--SEARCH TABLE t1 USING COVERING INDEX sqlite_autoindex_t1_1 (x=?)
+  |--SCAN x1 VIRTUAL TABLE INDEX 0:
+  `--SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (x=?)
 }
 
 do_eqp_test 2.2 {
   SELECT * FROM t1, x1(t1.x)
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SCAN TABLE x1 VIRTUAL TABLE INDEX 555:
+  |--SCAN t1
+  `--SCAN x1 VIRTUAL TABLE INDEX 555:
 }
 
 
diff --git a/test/bestindex7.test b/test/bestindex7.test
index aa1d70b86c..f8d42b2b00 100644
--- a/test/bestindex7.test
+++ b/test/bestindex7.test
@@ -76,4 +76,3 @@ do_execsql_test 1.11 { select * from vt1 WHERE a IN (0, NULL) } {0}
 do_execsql_test 1.12 { select * from vt1 WHERE a IN (NULL) } {}
 
 finish_test
-
diff --git a/test/between.test b/test/between.test
index e2b25ca3ce..16c3913d12 100644
--- a/test/between.test
+++ b/test/between.test
@@ -58,10 +58,10 @@ proc queryplan {sql} {
   set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
   # puts eqp=$eqp
   foreach {a b c x} $eqp {
-    if {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
-        $x all as tab idx]} {
+    if {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+        $x all ss as tab idx]} {
       lappend data $tab $idx
-    } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
       lappend data $tab *
     }
   }
diff --git a/test/bigmmap.test b/test/bigmmap.test
index 62e035b05f..99b028119f 100644
--- a/test/bigmmap.test
+++ b/test/bigmmap.test
@@ -94,9 +94,9 @@ for {set i 0} {$i < 9} {incr i} {
       ORDER BY b, c;
     " [string map {"\n    " "\n"} "
       QUERY PLAN
-      |--SCAN TABLE t$t AS o USING COVERING INDEX sqlite_autoindex_t${t}_1
+      |--SCAN t$t AS o USING COVERING INDEX sqlite_autoindex_t${t}_1
       `--CORRELATED SCALAR SUBQUERY xxxxxx
-         `--SEARCH TABLE t$t AS i USING INTEGER PRIMARY KEY (rowid=?)
+         `--SEARCH t$t AS i USING INTEGER PRIMARY KEY (rowid=?)
     "]
   }
 }
diff --git a/test/busy2.test b/test/busy2.test
index db8ca0e389..61fb8496a8 100644
--- a/test/busy2.test
+++ b/test/busy2.test
@@ -168,4 +168,3 @@ do_multiclient_test tn {
 }
 
 finish_test
-
diff --git a/test/columncount.test b/test/columncount.test
index 3ecc1f8d8a..669a35a72f 100644
--- a/test/columncount.test
+++ b/test/columncount.test
@@ -54,4 +54,3 @@ do_ccsql_test 1.6 { DROP TABLE t3 } {0}
 
 
 finish_test
-
diff --git a/test/cost.test b/test/cost.test
index 592973ab56..5684177a13 100644
--- a/test/cost.test
+++ b/test/cost.test
@@ -25,8 +25,8 @@ do_eqp_test 1.2 {
   SELECT e FROM t3, t4 WHERE b=c ORDER BY b, d;
 } {
   QUERY PLAN
-  |--SCAN TABLE t3 USING COVERING INDEX i3
-  `--SEARCH TABLE t4 USING INDEX i4 (c=?)
+  |--SCAN t3 USING COVERING INDEX i3
+  `--SEARCH t4 USING INDEX i4 (c=?)
 }
 
 
@@ -39,7 +39,7 @@ do_execsql_test 2.1 {
 # if the index is a non-covering index.
 do_eqp_test 2.2 {
   SELECT * FROM t1 ORDER BY a;
-} {SCAN TABLE t1 USING INDEX i1}
+} {SCAN t1 USING INDEX i1}
 
 do_execsql_test 3.1 {
   CREATE TABLE t5(a INTEGER PRIMARY KEY,b,c,d,e,f,g);
@@ -59,11 +59,11 @@ do_eqp_test 3.2 {
   QUERY PLAN
   |--MULTI-INDEX OR
   |  |--INDEX 1
-  |  |  `--SEARCH TABLE t5 USING INDEX t5b (b=?)
+  |  |  `--SEARCH t5 USING INDEX t5b (b=?)
   |  |--INDEX 2
-  |  |  `--SEARCH TABLE t5 USING INDEX t5c (c=?)
+  |  |  `--SEARCH t5 USING INDEX t5c (c=?)
   |  `--INDEX 3
-  |     `--SEARCH TABLE t5 USING INDEX t5d (d=?)
+  |     `--SEARCH t5 USING INDEX t5d (d=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -83,11 +83,11 @@ do_execsql_test 4.1 {
 }
 do_eqp_test 4.2 {
   SELECT * FROM t1 WHERE likelihood(a=?, 0.014) AND b BETWEEN ? AND ?;
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 
 do_eqp_test 4.3 {
   SELECT * FROM t1 WHERE likelihood(a=?, 0.016) AND b BETWEEN ? AND ?;
-} {SEARCH TABLE t1 USING INDEX i2 (b>? AND b<?)}
+} {SEARCH t1 USING INDEX i2 (b>? AND b<?)}
 
 
 #-------------------------------------------------------------------------
@@ -102,7 +102,7 @@ do_eqp_test 5.2 {
   SELECT * FROM t2 ORDER BY x, y;
 } {
   QUERY PLAN
-  |--SCAN TABLE t2 USING INDEX t2i1
+  |--SCAN t2 USING INDEX t2i1
   `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
 }
 
@@ -110,7 +110,7 @@ do_eqp_test 5.3 {
   SELECT * FROM t2 WHERE x BETWEEN ? AND ? ORDER BY rowid;
 } {
   QUERY PLAN
-  |--SEARCH TABLE t2 USING INDEX t2i1 (x>? AND x<?)
+  |--SEARCH t2 USING INDEX t2i1 (x>? AND x<?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -128,9 +128,9 @@ do_eqp_test 6.2 {
   QUERY PLAN
   |--MULTI-INDEX OR
   |  |--INDEX 1
-  |  |  `--SEARCH TABLE t3 USING INDEX t3i1 (b>? AND b<?)
+  |  |  `--SEARCH t3 USING INDEX t3i1 (b>? AND b<?)
   |  `--INDEX 2
-  |     `--SEARCH TABLE t3 USING INDEX t3i2 (c=?)
+  |     `--SEARCH t3 USING INDEX t3i2 (c=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -155,9 +155,9 @@ do_eqp_test 7.2 {
   QUERY PLAN
   |--MULTI-INDEX OR
   |  |--INDEX 1
-  |  |  `--SEARCH TABLE t1 USING INDEX t1b (b>? AND b<?)
+  |  |  `--SEARCH t1 USING INDEX t1b (b>? AND b<?)
   |  `--INDEX 2
-  |     `--SEARCH TABLE t1 USING INDEX t1b (b=?)
+  |     `--SEARCH t1 USING INDEX t1b (b=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -166,11 +166,11 @@ do_eqp_test 7.3 {
   WHERE (+b IS NULL AND c NOT NULL AND d NOT NULL)
         OR (b NOT NULL AND c IS NULL AND d NOT NULL)
         OR (b NOT NULL AND c NOT NULL AND d IS NULL)
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 do_eqp_test 7.4 {
   SELECT rowid FROM t1 WHERE (+b IS NULL AND c NOT NULL) OR c IS NULL
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 #-------------------------------------------------------------------------
 #
@@ -202,9 +202,9 @@ do_eqp_test 8.2 {
      AND unlikely(album.aid=track.aid);
 } {
   QUERY PLAN
-  |--SCAN TABLE track
-  |--SEARCH TABLE album USING INTEGER PRIMARY KEY (rowid=?)
-  |--SEARCH TABLE composer USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN track
+  |--SEARCH album USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH composer USING INTEGER PRIMARY KEY (rowid=?)
   `--USE TEMP B-TREE FOR DISTINCT
 }
 
@@ -271,19 +271,19 @@ ifcapable stat4 {
 
   do_eqp_test 10.3 {
     SELECT rowid FROM t6 WHERE a=0 AND c=0
-  } {SEARCH TABLE t6 USING INDEX t6i2 (c=?)}
+  } {SEARCH t6 USING INDEX t6i2 (c=?)}
 
   do_eqp_test 10.4 {
     SELECT rowid FROM t6 WHERE a=0 AND b='xyz' AND c=0
-  } {SEARCH TABLE t6 USING INDEX t6i2 (c=?)}
+  } {SEARCH t6 USING INDEX t6i2 (c=?)}
 
   do_eqp_test 10.5 {
     SELECT rowid FROM t6 WHERE likelihood(a=0, 0.1) AND c=0
-  } {SEARCH TABLE t6 USING INDEX t6i1 (a=?)}
+  } {SEARCH t6 USING INDEX t6i1 (a=?)}
 
   do_eqp_test 10.6 {
     SELECT rowid FROM t6 WHERE likelihood(a=0, 0.1) AND b='xyz' AND c=0
-  } {SEARCH TABLE t6 USING INDEX t6i1 (a=? AND b=?)}
+  } {SEARCH t6 USING INDEX t6i1 (a=? AND b=?)}
 }
 
 finish_test
diff --git a/test/count.test b/test/count.test
index 250eb669b0..9769b765f4 100644
--- a/test/count.test
+++ b/test/count.test
@@ -212,25 +212,25 @@ do_eqp_test count-7.2 {
   SELECT count(1) FROM t1;
 } {
   QUERY PLAN
-  `--SCAN TABLE t1 USING COVERING INDEX t1b
+  `--SCAN t1 USING COVERING INDEX t1b
 }
 do_eqp_test count-7.3 {
   SELECT count(1) FROM t1 NOT INDEXED
 } {
   QUERY PLAN
-  `--SCAN TABLE t1
+  `--SCAN t1
 }
 do_eqp_test count-7.3 {
   SELECT count(*) FROM t1;
 } {
   QUERY PLAN
-  `--SCAN TABLE t1 USING COVERING INDEX t1b
+  `--SCAN t1 USING COVERING INDEX t1b
 }
 do_eqp_test count-7.4 {
   SELECT count(*) FROM t1 NOT INDEXED
 } {
   QUERY PLAN
-  `--SCAN TABLE t1
+  `--SCAN t1
 }
 
 
diff --git a/test/coveridxscan.test b/test/coveridxscan.test
index cc98644390..c87227cabc 100644
--- a/test/coveridxscan.test
+++ b/test/coveridxscan.test
@@ -109,11 +109,11 @@ do_execsql_test 5.1.0 "
 
 do_eqp_test 5.1.1 {
   SELECT * FROM t1 ORDER BY c1, c2;
-} {SCAN TABLE t1 USING COVERING INDEX i1}
+} {SCAN t1 USING COVERING INDEX i1}
 
 do_eqp_test 5.1.2 {
   SELECT * FROM t2 ORDER BY c1, c2;
-} {SCAN TABLE t2 USING COVERING INDEX i2}
+} {SCAN t2 USING COVERING INDEX i2}
 
 
 finish_test
diff --git a/test/e_createtable.test b/test/e_createtable.test
index e83e5cca1c..c2cd1bc2c1 100644
--- a/test/e_createtable.test
+++ b/test/e_createtable.test
@@ -1393,13 +1393,13 @@ do_execsql_test 4.10.0 {
 }
 do_createtable_tests 4.10 {
   1    "EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b = 5" 
-       {/*SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (b=?)*/}
+       {/*SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (b=?)*/}
 
   2    "EXPLAIN QUERY PLAN SELECT * FROM t2 ORDER BY b, c"
-       {/*SCAN TABLE t2 USING INDEX sqlite_autoindex_t2_1*/}
+       {/*SCAN t2 USING INDEX sqlite_autoindex_t2_1*/}
 
   3    "EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE b=10 AND c>10"
-       {/*SEARCH TABLE t2 USING INDEX sqlite_autoindex_t2_1 (b=? AND c>?)*/}
+       {/*SEARCH t2 USING INDEX sqlite_autoindex_t2_1 (b=? AND c>?)*/}
 }
 
 # EVIDENCE-OF: R-45493-35653 A CHECK constraint may be attached to a
diff --git a/test/e_fkey.test b/test/e_fkey.test
index 40fa075df3..e5eb0d49c1 100644
--- a/test/e_fkey.test
+++ b/test/e_fkey.test
@@ -992,15 +992,15 @@ do_detail_test e_fkey-25.2 {
   EXPLAIN QUERY PLAN DELETE FROM artist WHERE 1;
   EXPLAIN QUERY PLAN SELECT rowid FROM track WHERE trackartist = ?;
 } {
-  {SCAN TABLE artist} 
-  {SCAN TABLE track}
+  {SCAN artist} 
+  {SCAN track}
 }
 do_detail_test e_fkey-25.3 {
   PRAGMA foreign_keys = ON;
   EXPLAIN QUERY PLAN DELETE FROM artist WHERE 1;
 } {
-  {SCAN TABLE artist} 
-  {SCAN TABLE track}
+  {SCAN artist} 
+  {SCAN track}
 }
 do_test e_fkey-25.4 {
   execsql {
@@ -1117,15 +1117,15 @@ do_test e_fkey-27.2 {
 do_detail_test e_fkey-27.3 {
   EXPLAIN QUERY PLAN UPDATE artist SET artistid = ?, artistname = ?
 } {
-  {SCAN TABLE artist} 
-  {SEARCH TABLE track USING COVERING INDEX trackindex (trackartist=?)} 
-  {SEARCH TABLE track USING COVERING INDEX trackindex (trackartist=?)}
+  {SCAN artist} 
+  {SEARCH track USING COVERING INDEX trackindex (trackartist=?)} 
+  {SEARCH track USING COVERING INDEX trackindex (trackartist=?)}
 }
 do_detail_test e_fkey-27.4 {
   EXPLAIN QUERY PLAN DELETE FROM artist
 } {
-  {SCAN TABLE artist} 
-  {SEARCH TABLE track USING COVERING INDEX trackindex (trackartist=?)}
+  {SCAN artist} 
+  {SEARCH track USING COVERING INDEX trackindex (trackartist=?)}
 }
 
 ###########################################################################
diff --git a/test/eqp.test b/test/eqp.test
index f931f8f340..19d6ea91ae 100644
--- a/test/eqp.test
+++ b/test/eqp.test
@@ -46,111 +46,131 @@ do_eqp_test 1.2 {
   QUERY PLAN
   |--MULTI-INDEX OR
   |  |--INDEX 1
-  |  |  `--SEARCH TABLE t1 USING INDEX i1 (a=?)
+  |  |  `--SEARCH t1 USING INDEX i1 (a=?)
   |  `--INDEX 2
-  |     `--SEARCH TABLE t1 USING INDEX i2 (b=?)
-  `--SCAN TABLE t2
+  |     `--SEARCH t1 USING INDEX i2 (b=?)
+  `--SCAN t2
 }
 do_eqp_test 1.3 {
   SELECT * FROM t2 CROSS JOIN t1 WHERE t1.a=1 OR t1.b=2;
 } {
   QUERY PLAN
-  |--SCAN TABLE t2
+  |--SCAN t2
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SEARCH TABLE t1 USING INDEX i1 (a=?)
+     |  `--SEARCH t1 USING INDEX i1 (a=?)
      `--INDEX 2
-        `--SEARCH TABLE t1 USING INDEX i2 (b=?)
+        `--SEARCH t1 USING INDEX i2 (b=?)
 }
 do_eqp_test 1.3 {
   SELECT a FROM t1 ORDER BY a
 } {
   QUERY PLAN
-  `--SCAN TABLE t1 USING COVERING INDEX i1
+  `--SCAN t1 USING COVERING INDEX i1
 }
 do_eqp_test 1.4 {
   SELECT a FROM t1 ORDER BY +a
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING COVERING INDEX i1
+  |--SCAN t1 USING COVERING INDEX i1
   `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test 1.5 {
   SELECT a FROM t1 WHERE a=4
 } {
   QUERY PLAN
-  `--SEARCH TABLE t1 USING COVERING INDEX i1 (a=?)
+  `--SEARCH t1 USING COVERING INDEX i1 (a=?)
 }
 do_eqp_test 1.6 {
   SELECT DISTINCT count(*) FROM t3 GROUP BY a;
 } {
   QUERY PLAN
-  |--SCAN TABLE t3
+  |--SCAN t3
   |--USE TEMP B-TREE FOR GROUP BY
   `--USE TEMP B-TREE FOR DISTINCT
 }
 
-do_eqp_test 1.7 {
+do_eqp_test 1.7.1 {
   SELECT * FROM t3 JOIN (SELECT 1)
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE SUBQUERY xxxxxx
   |  `--SCAN CONSTANT ROW
   |--SCAN SUBQUERY xxxxxx
-  `--SCAN TABLE t3
+  `--SCAN t3
 }
+do_eqp_test 1.7.2 {
+  SELECT * FROM t3 JOIN (SELECT 1) AS v1
+} {
+  QUERY PLAN
+  |--MATERIALIZE v1
+  |  `--SCAN CONSTANT ROW
+  |--SCAN v1
+  `--SCAN t3
+}
+do_eqp_test 1.7.3 {
+  SELECT * FROM t3 AS xx JOIN (SELECT 1) AS yy
+} {
+  QUERY PLAN
+  |--MATERIALIZE yy
+  |  `--SCAN CONSTANT ROW
+  |--SCAN yy
+  `--SCAN xx
+}
+
+
 do_eqp_test 1.8 {
   SELECT * FROM t3 JOIN (SELECT 1 UNION SELECT 2)
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE SUBQUERY xxxxxx
   |  `--COMPOUND QUERY
   |     |--LEFT-MOST SUBQUERY
   |     |  `--SCAN CONSTANT ROW
   |     `--UNION USING TEMP B-TREE
   |        `--SCAN CONSTANT ROW
   |--SCAN SUBQUERY xxxxxx
-  `--SCAN TABLE t3
+  `--SCAN t3
 }
 do_eqp_test 1.9 {
-  SELECT * FROM t3 JOIN (SELECT 1 EXCEPT SELECT a FROM t3 LIMIT 17)
+  SELECT * FROM t3 JOIN (SELECT 1 EXCEPT SELECT a FROM t3 LIMIT 17) AS abc
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE abc
   |  `--COMPOUND QUERY
   |     |--LEFT-MOST SUBQUERY
   |     |  `--SCAN CONSTANT ROW
   |     `--EXCEPT USING TEMP B-TREE
-  |        `--SCAN TABLE t3
-  |--SCAN SUBQUERY xxxxxx
-  `--SCAN TABLE t3
+  |        `--SCAN t3
+  |--SCAN abc
+  `--SCAN t3
 }
 do_eqp_test 1.10 {
-  SELECT * FROM t3 JOIN (SELECT 1 INTERSECT SELECT a FROM t3 LIMIT 17)
+  SELECT * FROM t3 JOIN (SELECT 1 INTERSECT SELECT a FROM t3 LIMIT 17) AS abc
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE abc
   |  `--COMPOUND QUERY
   |     |--LEFT-MOST SUBQUERY
   |     |  `--SCAN CONSTANT ROW
   |     `--INTERSECT USING TEMP B-TREE
-  |        `--SCAN TABLE t3
-  |--SCAN SUBQUERY xxxxxx
-  `--SCAN TABLE t3
+  |        `--SCAN t3
+  |--SCAN abc
+  `--SCAN t3
 }
 
 do_eqp_test 1.11 {
-  SELECT * FROM t3 JOIN (SELECT 1 UNION ALL SELECT a FROM t3 LIMIT 17)
+  SELECT * FROM t3 JOIN (SELECT 1 UNION ALL SELECT a FROM t3 LIMIT 17) abc
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE abc
   |  `--COMPOUND QUERY
   |     |--LEFT-MOST SUBQUERY
   |     |  `--SCAN CONSTANT ROW
   |     `--UNION ALL
-  |        `--SCAN TABLE t3
-  |--SCAN SUBQUERY xxxxxx
-  `--SCAN TABLE t3
+  |        `--SCAN t3
+  |--SCAN abc
+  `--SCAN t3
 }
 
 #-------------------------------------------------------------------------
@@ -166,57 +186,57 @@ do_execsql_test 2.1 {
 
 det 2.2.1 "SELECT DISTINCT min(x), max(x) FROM t1 GROUP BY x ORDER BY 1" {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   |--USE TEMP B-TREE FOR GROUP BY
   |--USE TEMP B-TREE FOR DISTINCT
   `--USE TEMP B-TREE FOR ORDER BY
 }
 det 2.2.2 "SELECT DISTINCT min(x), max(x) FROM t2 GROUP BY x ORDER BY 1" {
   QUERY PLAN
-  |--SCAN TABLE t2 USING COVERING INDEX t2i1
+  |--SCAN t2 USING COVERING INDEX t2i1
   |--USE TEMP B-TREE FOR DISTINCT
   `--USE TEMP B-TREE FOR ORDER BY
 }
 det 2.2.3 "SELECT DISTINCT * FROM t1" {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--USE TEMP B-TREE FOR DISTINCT
 }
 det 2.2.4 "SELECT DISTINCT * FROM t1, t2" {
   QUERY PLAN
-  |--SCAN TABLE t1
-  |--SCAN TABLE t2
+  |--SCAN t1
+  |--SCAN t2
   `--USE TEMP B-TREE FOR DISTINCT
 }
 det 2.2.5 "SELECT DISTINCT * FROM t1, t2 ORDER BY t1.x" {
   QUERY PLAN
-  |--SCAN TABLE t1
-  |--SCAN TABLE t2
+  |--SCAN t1
+  |--SCAN t2
   |--USE TEMP B-TREE FOR DISTINCT
   `--USE TEMP B-TREE FOR ORDER BY
 }
 det 2.2.6 "SELECT DISTINCT t2.x FROM t1, t2 ORDER BY t2.x" {
   QUERY PLAN
-  |--SCAN TABLE t2 USING COVERING INDEX t2i1
-  `--SCAN TABLE t1
+  |--SCAN t2 USING COVERING INDEX t2i1
+  `--SCAN t1
 }
 
 det 2.3.1 "SELECT max(x) FROM t2" {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING COVERING INDEX t2i1
+  `--SEARCH t2 USING COVERING INDEX t2i1
 }
 det 2.3.2 "SELECT min(x) FROM t2" {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING COVERING INDEX t2i1
+  `--SEARCH t2 USING COVERING INDEX t2i1
 }
 det 2.3.3 "SELECT min(x), max(x) FROM t2" {
   QUERY PLAN
-  `--SCAN TABLE t2 USING COVERING INDEX t2i1
+  `--SCAN t2 USING COVERING INDEX t2i1
 }
 
 det 2.4.1 "SELECT * FROM t1 WHERE rowid=?" {
   QUERY PLAN
-  `--SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+  `--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 
@@ -228,42 +248,42 @@ do_eqp_test 3.1.1 {
   SELECT (SELECT x FROM t1 AS sub) FROM t1;
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--SCALAR SUBQUERY xxxxxx
-     `--SCAN TABLE t1 AS sub
+     `--SCAN sub
 }
 do_eqp_test 3.1.2 {
   SELECT * FROM t1 WHERE (SELECT x FROM t1 AS sub);
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--SCALAR SUBQUERY xxxxxx
-     `--SCAN TABLE t1 AS sub
+     `--SCAN sub
 }
 do_eqp_test 3.1.3 {
   SELECT * FROM t1 WHERE (SELECT x FROM t1 AS sub ORDER BY y);
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--SCALAR SUBQUERY xxxxxx
-     |--SCAN TABLE t1 AS sub
+     |--SCAN sub
      `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test 3.1.4 {
   SELECT * FROM t1 WHERE (SELECT x FROM t2 ORDER BY x);
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--SCALAR SUBQUERY xxxxxx
-     `--SCAN TABLE t2 USING COVERING INDEX t2i1
+     `--SCAN t2 USING COVERING INDEX t2i1
 }
 
 det 3.2.1 {
   SELECT * FROM (SELECT * FROM t1 ORDER BY x LIMIT 10) ORDER BY y LIMIT 5
 } {
   QUERY PLAN
-  |--CO-ROUTINE xxxxxx
-  |  |--SCAN TABLE t1
+  |--CO-ROUTINE SUBQUERY xxxxxx
+  |  |--SCAN t1
   |  `--USE TEMP B-TREE FOR ORDER BY
   |--SCAN SUBQUERY xxxxxx
   `--USE TEMP B-TREE FOR ORDER BY
@@ -275,13 +295,13 @@ det 3.2.2 {
   ORDER BY x2.y LIMIT 5
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--SCAN TABLE t1
+  |--MATERIALIZE x1
+  |  |--SCAN t1
   |  `--USE TEMP B-TREE FOR ORDER BY
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN TABLE t2 USING INDEX t2i1
-  |--SCAN SUBQUERY xxxxxx AS x1
-  |--SCAN SUBQUERY xxxxxx AS x2
+  |--MATERIALIZE x2
+  |  `--SCAN t2 USING INDEX t2i1
+  |--SCAN x1
+  |--SCAN x2
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -289,25 +309,25 @@ det 3.3.1 {
   SELECT * FROM t1 WHERE y IN (SELECT y FROM t2)
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--LIST SUBQUERY xxxxxx
-     `--SCAN TABLE t2
+     `--SCAN t2
 }
 det 3.3.2 {
   SELECT * FROM t1 WHERE y IN (SELECT y FROM t2 WHERE t1.x!=t2.x)
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--CORRELATED LIST SUBQUERY xxxxxx
-     `--SCAN TABLE t2
+     `--SCAN t2
 }
 det 3.3.3 {
   SELECT * FROM t1 WHERE EXISTS (SELECT y FROM t2 WHERE t1.x!=t2.x)
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--CORRELATED SCALAR SUBQUERY xxxxxx
-     `--SCAN TABLE t2
+     `--SCAN t2
 }
 
 #-------------------------------------------------------------------------
@@ -319,9 +339,9 @@ do_eqp_test 4.1.1 {
   QUERY PLAN
   `--COMPOUND QUERY
      |--LEFT-MOST SUBQUERY
-     |  `--SCAN TABLE t1
+     |  `--SCAN t1
      `--UNION ALL
-        `--SCAN TABLE t2
+        `--SCAN t2
 }
 do_eqp_test 4.1.2 {
   SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY 2
@@ -329,10 +349,10 @@ do_eqp_test 4.1.2 {
   QUERY PLAN
   `--MERGE (UNION ALL)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2
+        |--SCAN t2
         `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test 4.1.3 {
@@ -341,10 +361,10 @@ do_eqp_test 4.1.3 {
   QUERY PLAN
   `--MERGE (UNION)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2
+        |--SCAN t2
         `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test 4.1.4 {
@@ -353,10 +373,10 @@ do_eqp_test 4.1.4 {
   QUERY PLAN
   `--MERGE (INTERSECT)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2
+        |--SCAN t2
         `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test 4.1.5 {
@@ -365,10 +385,10 @@ do_eqp_test 4.1.5 {
   QUERY PLAN
   `--MERGE (EXCEPT)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2
+        |--SCAN t2
         `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -378,10 +398,10 @@ do_eqp_test 4.2.2 {
   QUERY PLAN
   `--MERGE (UNION ALL)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        `--SCAN TABLE t2 USING INDEX t2i1
+        `--SCAN t2 USING INDEX t2i1
 }
 do_eqp_test 4.2.3 {
   SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1
@@ -389,10 +409,10 @@ do_eqp_test 4.2.3 {
   QUERY PLAN
   `--MERGE (UNION)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2 USING INDEX t2i1
+        |--SCAN t2 USING INDEX t2i1
         `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
 }
 do_eqp_test 4.2.4 {
@@ -401,10 +421,10 @@ do_eqp_test 4.2.4 {
   QUERY PLAN
   `--MERGE (INTERSECT)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2 USING INDEX t2i1
+        |--SCAN t2 USING INDEX t2i1
         `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
 }
 do_eqp_test 4.2.5 {
@@ -413,10 +433,10 @@ do_eqp_test 4.2.5 {
   QUERY PLAN
   `--MERGE (EXCEPT)
      |--LEFT
-     |  |--SCAN TABLE t1
+     |  |--SCAN t1
      |  `--USE TEMP B-TREE FOR ORDER BY
      `--RIGHT
-        |--SCAN TABLE t2 USING INDEX t2i1
+        |--SCAN t2 USING INDEX t2i1
         `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
 }
 
@@ -426,9 +446,9 @@ do_eqp_test 4.3.1 {
   QUERY PLAN
   `--COMPOUND QUERY
      |--LEFT-MOST SUBQUERY
-     |  `--SCAN TABLE t1
+     |  `--SCAN t1
      `--UNION USING TEMP B-TREE
-        `--SCAN TABLE t2 USING COVERING INDEX t2i1
+        `--SCAN t2 USING COVERING INDEX t2i1
 }
 
 do_eqp_test 4.3.2 {
@@ -437,11 +457,11 @@ do_eqp_test 4.3.2 {
   QUERY PLAN
   `--COMPOUND QUERY
      |--LEFT-MOST SUBQUERY
-     |  `--SCAN TABLE t1
+     |  `--SCAN t1
      |--UNION USING TEMP B-TREE
-     |  `--SCAN TABLE t2 USING COVERING INDEX t2i1
+     |  `--SCAN t2 USING COVERING INDEX t2i1
      `--UNION USING TEMP B-TREE
-        `--SCAN TABLE t1
+        `--SCAN t1
 }
 do_eqp_test 4.3.3 {
   SELECT x FROM t1 UNION SELECT x FROM t2 UNION SELECT x FROM t1 ORDER BY 1
@@ -451,12 +471,12 @@ do_eqp_test 4.3.3 {
      |--LEFT
      |  `--MERGE (UNION)
      |     |--LEFT
-     |     |  |--SCAN TABLE t1
+     |     |  |--SCAN t1
      |     |  `--USE TEMP B-TREE FOR ORDER BY
      |     `--RIGHT
-     |        `--SCAN TABLE t2 USING COVERING INDEX t2i1
+     |        `--SCAN t2 USING COVERING INDEX t2i1
      `--RIGHT
-        |--SCAN TABLE t1
+        |--SCAN t1
         `--USE TEMP B-TREE FOR ORDER BY
 }
 
@@ -469,145 +489,145 @@ drop_all_tables
 
 # XVIDENCE-OF: R-47779-47605 sqlite> EXPLAIN QUERY PLAN SELECT a, b
 # FROM t1 WHERE a=1;
-# 0|0|0|SCAN TABLE t1
+# 0|0|0|SCAN t1
 #
 do_execsql_test 5.1.0 { CREATE TABLE t1(a INT, b INT, ex TEXT) }
 det 5.1.1 "SELECT a, b FROM t1 WHERE a=1" {
-  0 0 0 {SCAN TABLE t1}
+  0 0 0 {SCAN t1}
 }
 
 # XVIDENCE-OF: R-55852-17599 sqlite> CREATE INDEX i1 ON t1(a);
 # sqlite> EXPLAIN QUERY PLAN SELECT a, b FROM t1 WHERE a=1;
-# 0|0|0|SEARCH TABLE t1 USING INDEX i1
+# 0|0|0|SEARCH t1 USING INDEX i1
 #
 do_execsql_test 5.2.0 { CREATE INDEX i1 ON t1(a) }
 det 5.2.1 "SELECT a, b FROM t1 WHERE a=1" {
-  0 0 0 {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+  0 0 0 {SEARCH t1 USING INDEX i1 (a=?)}
 }
 
 # XVIDENCE-OF: R-21179-11011 sqlite> CREATE INDEX i2 ON t1(a, b);
 # sqlite> EXPLAIN QUERY PLAN SELECT a, b FROM t1 WHERE a=1;
-# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
+# 0|0|0|SEARCH t1 USING COVERING INDEX i2 (a=?)
 #
 do_execsql_test 5.3.0 { CREATE INDEX i2 ON t1(a, b) }
 det 5.3.1 "SELECT a, b FROM t1 WHERE a=1" {
-  0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
+  0 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=?)}
 }
 
 # XVIDENCE-OF: R-09991-48941 sqlite> EXPLAIN QUERY PLAN
 # SELECT t1.*, t2.* FROM t1, t2 WHERE t1.a=1 AND t1.b>2;
-# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)
-# 0|1|1|SCAN TABLE t2
+# 0|0|0|SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)
+# 0|1|1|SCAN t2
 #
 do_execsql_test 5.4.0 {CREATE TABLE t2(c INT, d INT, ex TEXT)}
 det 5.4.1 "SELECT t1.a, t2.c FROM t1, t2 WHERE t1.a=1 AND t1.b>2" {
-  0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)}
-  0 1 1 {SCAN TABLE t2}
+  0 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)}
+  0 1 1 {SCAN t2}
 }
 
 # XVIDENCE-OF: R-33626-61085 sqlite> EXPLAIN QUERY PLAN
 # SELECT t1.*, t2.* FROM t2, t1 WHERE t1.a=1 AND t1.b>2;
-# 0|0|1|SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)
-# 0|1|0|SCAN TABLE t2
+# 0|0|1|SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)
+# 0|1|0|SCAN t2
 #
 det 5.5 "SELECT t1.a, t2.c FROM t2, t1 WHERE t1.a=1 AND t1.b>2" {
-  0 0 1 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)}
-  0 1 0 {SCAN TABLE t2}
+  0 0 1 {SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)}
+  0 1 0 {SCAN t2}
 }
 
 # XVIDENCE-OF: R-04002-25654 sqlite> CREATE INDEX i3 ON t1(b);
 # sqlite> EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=1 OR b=2;
-# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
-# 0|0|0|SEARCH TABLE t1 USING INDEX i3 (b=?)
+# 0|0|0|SEARCH t1 USING COVERING INDEX i2 (a=?)
+# 0|0|0|SEARCH t1 USING INDEX i3 (b=?)
 #
 do_execsql_test 5.5.0 {CREATE INDEX i3 ON t1(b)}
 det 5.6.1 "SELECT a, b FROM t1 WHERE a=1 OR b=2" {
-  0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
-  0 0 0 {SEARCH TABLE t1 USING INDEX i3 (b=?)}
+  0 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=?)}
+  0 0 0 {SEARCH t1 USING INDEX i3 (b=?)}
 }
 
 # XVIDENCE-OF: R-24577-38891 sqlite> EXPLAIN QUERY PLAN
 # SELECT c, d FROM t2 ORDER BY c;
-# 0|0|0|SCAN TABLE t2
+# 0|0|0|SCAN t2
 # 0|0|0|USE TEMP B-TREE FOR ORDER BY
 #
 det 5.7 "SELECT c, d FROM t2 ORDER BY c" {
-  0 0 0 {SCAN TABLE t2}
+  0 0 0 {SCAN t2}
   0 0 0 {USE TEMP B-TREE FOR ORDER BY}
 }
 
 # XVIDENCE-OF: R-58157-12355 sqlite> CREATE INDEX i4 ON t2(c);
 # sqlite> EXPLAIN QUERY PLAN SELECT c, d FROM t2 ORDER BY c;
-# 0|0|0|SCAN TABLE t2 USING INDEX i4
+# 0|0|0|SCAN t2 USING INDEX i4
 #
 do_execsql_test 5.8.0 {CREATE INDEX i4 ON t2(c)}
 det 5.8.1 "SELECT c, d FROM t2 ORDER BY c" {
-  0 0 0 {SCAN TABLE t2 USING INDEX i4}
+  0 0 0 {SCAN t2 USING INDEX i4}
 }
 
 # XVIDENCE-OF: R-13931-10421 sqlite> EXPLAIN QUERY PLAN SELECT
 # (SELECT b FROM t1 WHERE a=0), (SELECT a FROM t1 WHERE b=t2.c) FROM t2;
-# 0|0|0|SCAN TABLE t2
+# 0|0|0|SCAN t2
 # 0|0|0|EXECUTE SCALAR SUBQUERY 1
-# 1|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
+# 1|0|0|SEARCH t1 USING COVERING INDEX i2 (a=?)
 # 0|0|0|EXECUTE CORRELATED SCALAR SUBQUERY 2
-# 2|0|0|SEARCH TABLE t1 USING INDEX i3 (b=?)
+# 2|0|0|SEARCH t1 USING INDEX i3 (b=?)
 #
 det 5.9 {
   SELECT (SELECT b FROM t1 WHERE a=0), (SELECT a FROM t1 WHERE b=t2.c) FROM t2
 } {
-  0 0 0 {SCAN TABLE t2 USING COVERING INDEX i4}
+  0 0 0 {SCAN t2 USING COVERING INDEX i4}
   0 0 0 {EXECUTE SCALAR SUBQUERY 1}
-  1 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
+  1 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=?)}
   0 0 0 {EXECUTE CORRELATED SCALAR SUBQUERY 2}
-  2 0 0 {SEARCH TABLE t1 USING INDEX i3 (b=?)}
+  2 0 0 {SEARCH t1 USING INDEX i3 (b=?)}
 }
 
 # XVIDENCE-OF: R-50892-45943 sqlite> EXPLAIN QUERY PLAN
 # SELECT count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x;
-# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2
+# 1|0|0|SCAN t1 USING COVERING INDEX i2
 # 0|0|0|SCAN SUBQUERY 1
 # 0|0|0|USE TEMP B-TREE FOR GROUP BY
 #
 det 5.10 {
   SELECT count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x
 } {
-  1 0 0 {SCAN TABLE t1 USING COVERING INDEX i2}
+  1 0 0 {SCAN t1 USING COVERING INDEX i2}
   0 0 0 {SCAN SUBQUERY 1}
   0 0 0 {USE TEMP B-TREE FOR GROUP BY}
 }
 
 # XVIDENCE-OF: R-46219-33846 sqlite> EXPLAIN QUERY PLAN
 # SELECT * FROM (SELECT * FROM t2 WHERE c=1), t1;
-# 0|0|0|SEARCH TABLE t2 USING INDEX i4 (c=?)
-# 0|1|1|SCAN TABLE t1
+# 0|0|0|SEARCH t2 USING INDEX i4 (c=?)
+# 0|1|1|SCAN t1
 #
 det 5.11 "SELECT a, b FROM (SELECT * FROM t2 WHERE c=1), t1" {
-  0 0 0 {SEARCH TABLE t2 USING INDEX i4 (c=?)}
-  0 1 1 {SCAN TABLE t1 USING COVERING INDEX i2}
+  0 0 0 {SEARCH t2 USING INDEX i4 (c=?)}
+  0 1 1 {SCAN t1 USING COVERING INDEX i2}
 }
 
 # XVIDENCE-OF: R-37879-39987 sqlite> EXPLAIN QUERY PLAN
 # SELECT a FROM t1 UNION SELECT c FROM t2;
-# 1|0|0|SCAN TABLE t1
-# 2|0|0|SCAN TABLE t2
+# 1|0|0|SCAN t1
+# 2|0|0|SCAN t2
 # 0|0|0|COMPOUND SUBQUERIES 1 AND 2 USING TEMP B-TREE (UNION)
 #
 det 5.12 "SELECT a,b FROM t1 UNION SELECT c, 99 FROM t2" {
-  1 0 0 {SCAN TABLE t1 USING COVERING INDEX i2}
-  2 0 0 {SCAN TABLE t2 USING COVERING INDEX i4}
+  1 0 0 {SCAN t1 USING COVERING INDEX i2}
+  2 0 0 {SCAN t2 USING COVERING INDEX i4}
   0 0 0 {COMPOUND SUBQUERIES 1 AND 2 USING TEMP B-TREE (UNION)}
 }
 
 # XVIDENCE-OF: R-44864-63011 sqlite> EXPLAIN QUERY PLAN
 # SELECT a FROM t1 EXCEPT SELECT d FROM t2 ORDER BY 1;
-# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2
-# 2|0|0|SCAN TABLE t2 2|0|0|USE TEMP B-TREE FOR ORDER BY
+# 1|0|0|SCAN t1 USING COVERING INDEX i2
+# 2|0|0|SCAN t2 2|0|0|USE TEMP B-TREE FOR ORDER BY
 # 0|0|0|COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)
 #
 det 5.13 "SELECT a FROM t1 EXCEPT SELECT d FROM t2 ORDER BY 1" {
-  1 0 0 {SCAN TABLE t1 USING COVERING INDEX i1}
-  2 0 0 {SCAN TABLE t2}
+  1 0 0 {SCAN t1 USING COVERING INDEX i1}
+  2 0 0 {SCAN t2}
   2 0 0 {USE TEMP B-TREE FOR ORDER BY}
   0 0 0 {COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)}
 }
@@ -647,8 +667,8 @@ if {![nonzero_reserved_bytes]} {
   do_peqp_test 6.1 {
     SELECT a, b FROM t1 EXCEPT SELECT d, 99 FROM t2 ORDER BY 1
   } [string trimleft {
-1 0 0 SCAN TABLE t1 USING COVERING INDEX i2
-2 0 0 SCAN TABLE t2
+1 0 0 SCAN t1 USING COVERING INDEX i2
+2 0 0 SCAN t2
 2 0 0 USE TEMP B-TREE FOR ORDER BY
 0 0 0 COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)
 }]
@@ -669,12 +689,12 @@ do_execsql_test 7.0 {
 
 det 7.1 "SELECT count(*) FROM t1" {
   QUERY PLAN
-  `--SCAN TABLE t1
+  `--SCAN t1
 }
 
 det 7.2 "SELECT count(*) FROM t2" {
   QUERY PLAN
-  `--SCAN TABLE t2 USING COVERING INDEX i1
+  `--SCAN t2 USING COVERING INDEX i1
 }
 
 do_execsql_test 7.3 {
@@ -693,12 +713,12 @@ sqlite3 db test.db
 
 det 7.4 "SELECT count(*) FROM t1" {
   QUERY PLAN
-  `--SCAN TABLE t1
+  `--SCAN t1
 }
 
 det 7.5 "SELECT count(*) FROM t2" {
   QUERY PLAN
-  `--SCAN TABLE t2 USING COVERING INDEX i1
+  `--SCAN t2 USING COVERING INDEX i1
 }
 
 #-------------------------------------------------------------------------
@@ -714,37 +734,37 @@ do_execsql_test 8.0 {
 
 det 8.1.1 "SELECT * FROM t2" {
   QUERY PLAN
-  `--SCAN TABLE t2
+  `--SCAN t2
 }
 
 det 8.1.2 "SELECT * FROM t2 WHERE rowid=?" {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 det 8.1.3 "SELECT count(*) FROM t2" {
   QUERY PLAN
-  `--SCAN TABLE t2
+  `--SCAN t2
 }
 
 det 8.2.1 "SELECT * FROM t1" {
   QUERY PLAN
-  `--SCAN TABLE t1
+  `--SCAN t1
 }
 
 det 8.2.2 "SELECT * FROM t1 WHERE b=?" {
   QUERY PLAN
-  `--SEARCH TABLE t1 USING PRIMARY KEY (b=?)
+  `--SEARCH t1 USING PRIMARY KEY (b=?)
 }
 
 det 8.2.3 "SELECT * FROM t1 WHERE b=? AND c=?" {
   QUERY PLAN
-  `--SEARCH TABLE t1 USING PRIMARY KEY (b=? AND c=?)
+  `--SEARCH t1 USING PRIMARY KEY (b=? AND c=?)
 }
 
 det 8.2.4 "SELECT count(*) FROM t1" {
   QUERY PLAN
-  `--SCAN TABLE t1
+  `--SCAN t1
 }
 
 # 2018-08-16:  While working on Fossil I discovered that EXPLAIN QUERY PLAN
@@ -814,16 +834,16 @@ do_eqp_test 9.1 {
   ORDER BY 1;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--SCAN TABLE forumpost AS x USING INDEX forumthread
+  |--MATERIALIZE thread
+  |  |--SCAN x USING INDEX forumthread
   |  |--USING ROWID SEARCH ON TABLE private FOR IN-OPERATOR
   |  |--CORRELATED SCALAR SUBQUERY xxxxxx
-  |  |  |--SEARCH TABLE forumpost USING COVERING INDEX forumthread (froot=?)
+  |  |  |--SEARCH forumpost USING COVERING INDEX forumthread (froot=?)
   |  |  `--USING ROWID SEARCH ON TABLE private FOR IN-OPERATOR
   |  `--USE TEMP B-TREE FOR ORDER BY
-  |--SCAN SUBQUERY xxxxxx
-  |--SEARCH TABLE blob USING INTEGER PRIMARY KEY (rowid=?)
-  |--SEARCH TABLE event USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN thread
+  |--SEARCH blob USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH event USING INTEGER PRIMARY KEY (rowid=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
diff --git a/test/exists2.test b/test/exists2.test
index c4fc9dc373..04b741c7ca 100644
--- a/test/exists2.test
+++ b/test/exists2.test
@@ -50,7 +50,7 @@ do_execsql_eqp_test 1.1 {
 do_execsql_eqp_test 1.2 {
   SELECT t1.* FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.c=t1.a);
 } {
-  SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+  SEARCH t1 USING INTEGER PRIMARY KEY
 } {
   1 one 3 three 5 five 7 seven
 }
@@ -58,7 +58,7 @@ do_execsql_eqp_test 1.2 {
 do_execsql_eqp_test 1.3 {
   SELECT t1.* FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.c+1=t1.a);
 } {
-  SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+  SEARCH t1 USING INTEGER PRIMARY KEY
 } {
   2 two 4 four 6 six
 }
@@ -66,7 +66,7 @@ do_execsql_eqp_test 1.3 {
 do_execsql_eqp_test 1.4 {
   SELECT t1.* FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.c+1=t1.a+1);
 } {
-  SCAN TABLE t1
+  SCAN t1
 } {
   1 one 3 three 5 five 7 seven
 }
@@ -76,7 +76,7 @@ do_execsql_eqp_test 1.5 {
     SELECT * FROM t2 WHERE t1.a=t2.c AND d IN (1, 2, 3)
   );
 } {
-  SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+  SEARCH t1 USING INTEGER PRIMARY KEY
 } {
   1 one 3 three 5 five
 }
@@ -86,7 +86,7 @@ do_execsql_eqp_test 1.6 {
     SELECT * FROM t2 WHERE d IN (1, 2, 3)AND t1.a=t2.c 
   );
 } {
-  SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+  SEARCH t1 USING INTEGER PRIMARY KEY
 } {
   1 one 3 three 5 five
 }
@@ -96,7 +96,7 @@ do_execsql_eqp_test 1.7 {
     SELECT * FROM t2 WHERE d IN (1, 2, 3)AND t1.a=t2.c 
   );
 } {
-  SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+  SEARCH t1 USING INTEGER PRIMARY KEY
 } {
   1 one 3 three 5 five
 }
@@ -123,7 +123,7 @@ do_execsql_test 2.2 { SELECT a FROM t3, t4 WHERE c=a } {five four one two}
 do_execsql_eqp_test 2.3 {
   SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE a=c)
 } {
-  SEARCH TABLE t3 USING PRIMARY KEY
+  SEARCH t3 USING PRIMARY KEY
 } {
   four one
 }
@@ -131,7 +131,7 @@ do_execsql_eqp_test 2.3 {
 do_execsql_eqp_test 2.4 {
   SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE c=a)
 } {
-  SCAN TABLE t3
+  SCAN t3
 } {
   five four one two
 }
@@ -143,7 +143,7 @@ do_execsql_test 2.5 {
 do_execsql_eqp_test 2.6 {
   SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE c=a)
 } {
-  SEARCH TABLE t3 USING COVERING INDEX t3anc
+  SEARCH t3 USING COVERING INDEX t3anc
 } {
   five four one two
 }
@@ -154,7 +154,7 @@ do_execsql_test 2.6a {
 do_execsql_eqp_test 2.7 {
   SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE a=c)
 } {
-  SEARCH TABLE t3 USING PRIMARY KEY
+  SEARCH t3 USING PRIMARY KEY
 } {
   four one
 }
diff --git a/test/existsfault.test b/test/existsfault.test
index 24e44a7b58..4a33eeb357 100644
--- a/test/existsfault.test
+++ b/test/existsfault.test
@@ -49,4 +49,3 @@ do_faultsim_test 1 -prep {
 
 
 finish_test
-
diff --git a/test/fts3aux1.test b/test/fts3aux1.test
index c7e1ac1a5c..1524d6d30f 100644
--- a/test/fts3aux1.test
+++ b/test/fts3aux1.test
@@ -105,10 +105,10 @@ db func rec rec
 #
 do_execsql_test 2.1.1.1 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term='braid'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 1:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 1:*/}
 do_execsql_test 2.1.1.2 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term='braid'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
 
 # Now show that using "term='braid'" means the virtual table returns
 # only 1 row to SQLite, but "+term='braid'" means all 19 are returned.
@@ -154,24 +154,24 @@ do_execsql_test 2.1.5 { SELECT * FROM terms WHERE term=NULL } {}
 
 do_execsql_test 2.2.1.1 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term>'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 2:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 2:*/}
 do_execsql_test 2.2.1.2 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term>'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
 
 do_execsql_test 2.2.1.3 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term<'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 4:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 4:*/}
 do_execsql_test 2.2.1.4 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term<'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
 
 do_execsql_test 2.2.1.5 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term BETWEEN 'brags' AND 'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 6:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 6:*/}
 do_execsql_test 2.2.1.6 {
   EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term BETWEEN 'brags' AND 'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
 
 do_test 2.2.2.1 {
   set cnt 0
@@ -335,7 +335,7 @@ foreach {tn sort orderby} {
   9    1    "ORDER BY occurrences DESC"
 } {
 
-  set res {SCAN TABLE terms VIRTUAL TABLE INDEX 0:}
+  set res {SCAN terms VIRTUAL TABLE INDEX 0:}
   if {$sort} { append res {*USE TEMP B-TREE FOR ORDER BY} }
   set res "/*$res*/"
 
@@ -413,8 +413,8 @@ do_plansql_test 4.2 {
   SELECT y FROM x2, terms WHERE y = term AND col = '*'
 } {
   QUERY PLAN
-  |--SCAN TABLE x2
-  `--SCAN TABLE terms VIRTUAL TABLE INDEX 1:
+  |--SCAN x2
+  `--SCAN terms VIRTUAL TABLE INDEX 1:
 } {
   a b c d e f g h i j k l
 }
@@ -423,8 +423,8 @@ do_plansql_test 4.3 {
   SELECT y FROM terms, x2 WHERE y = term AND col = '*'
 } {
   QUERY PLAN
-  |--SCAN TABLE x2
-  `--SCAN TABLE terms VIRTUAL TABLE INDEX 1:
+  |--SCAN x2
+  `--SCAN terms VIRTUAL TABLE INDEX 1:
 } {
   a b c d e f g h i j k l
 }
@@ -433,8 +433,8 @@ do_plansql_test 4.4 {
   SELECT y FROM x3, terms WHERE y = term AND col = '*'
 } {
   QUERY PLAN
-  |--SCAN TABLE terms VIRTUAL TABLE INDEX 0:
-  `--SEARCH TABLE x3 USING COVERING INDEX i1 (y=?)
+  |--SCAN terms VIRTUAL TABLE INDEX 0:
+  `--SEARCH x3 USING COVERING INDEX i1 (y=?)
 } {
   a b c d e f g h i j k l
 }
@@ -443,8 +443,8 @@ do_plansql_test 4.5 {
   SELECT y FROM terms, x3 WHERE y = term AND occurrences>1 AND col = '*'
 } {
   QUERY PLAN
-  |--SCAN TABLE terms VIRTUAL TABLE INDEX 0:
-  `--SEARCH TABLE x3 USING COVERING INDEX i1 (y=?)
+  |--SCAN terms VIRTUAL TABLE INDEX 0:
+  `--SEARCH x3 USING COVERING INDEX i1 (y=?)
 } {
   a k l
 }
diff --git a/test/fts3corrupt6.test b/test/fts3corrupt6.test
index 5cb0a18691..8788a61d67 100644
--- a/test/fts3corrupt6.test
+++ b/test/fts3corrupt6.test
@@ -64,5 +64,3 @@ do_execsql_test 2.1 {
 
 set sqlite_fts3_enable_parentheses $saved_sqlite_fts3_enable_parentheses
 finish_test
-
-
diff --git a/test/fts3join.test b/test/fts3join.test
index f3b9b3639a..9a7994193f 100644
--- a/test/fts3join.test
+++ b/test/fts3join.test
@@ -97,10 +97,10 @@ do_eqp_test 4.2 {
   WHERE t4.y = ?;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN TABLE ft4 VIRTUAL TABLE INDEX 3:
-  |--SCAN TABLE t4
-  `--SEARCH SUBQUERY xxxxxx AS rr USING AUTOMATIC COVERING INDEX (docid=?)
+  |--MATERIALIZE rr
+  |  `--SCAN ft4 VIRTUAL TABLE INDEX 3:
+  |--SCAN t4
+  `--SEARCH rr USING AUTOMATIC COVERING INDEX (docid=?)
 }
 
 finish_test
diff --git a/test/fts3query.test b/test/fts3query.test
index ca3ee6695a..70ee005291 100644
--- a/test/fts3query.test
+++ b/test/fts3query.test
@@ -119,29 +119,29 @@ do_eqp_test fts3query-4.2 {
   SELECT t1.number FROM t1, ft WHERE t1.number=ft.rowid ORDER BY t1.date
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING COVERING INDEX i1
-  `--SCAN TABLE ft VIRTUAL TABLE INDEX 1:
+  |--SCAN t1 USING COVERING INDEX i1
+  `--SCAN ft VIRTUAL TABLE INDEX 1:
 }
 do_eqp_test fts3query-4.3 {
   SELECT t1.number FROM ft, t1 WHERE t1.number=ft.rowid ORDER BY t1.date
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING COVERING INDEX i1
-  `--SCAN TABLE ft VIRTUAL TABLE INDEX 1:
+  |--SCAN t1 USING COVERING INDEX i1
+  `--SCAN ft VIRTUAL TABLE INDEX 1:
 }
 do_eqp_test fts3query-4.4 {
   SELECT t1.number FROM t1, bt WHERE t1.number=bt.rowid ORDER BY t1.date
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING COVERING INDEX i1
-  `--SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1 USING COVERING INDEX i1
+  `--SEARCH bt USING INTEGER PRIMARY KEY (rowid=?)
 }
 do_eqp_test fts3query-4.5 {
   SELECT t1.number FROM bt, t1 WHERE t1.number=bt.rowid ORDER BY t1.date
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING COVERING INDEX i1
-  `--SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1 USING COVERING INDEX i1
+  `--SEARCH bt USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 
diff --git a/test/fts3snippet2.test b/test/fts3snippet2.test
index fc39941890..607b01e0f8 100644
--- a/test/fts3snippet2.test
+++ b/test/fts3snippet2.test
@@ -57,4 +57,3 @@ do_execsql_test 2.2 {
 
 set sqlite_fts3_enable_parentheses 0
 finish_test
-
diff --git a/test/fts4upfrom.test b/test/fts4upfrom.test
index b1b43a0374..889b64ad68 100644
--- a/test/fts4upfrom.test
+++ b/test/fts4upfrom.test
@@ -137,4 +137,3 @@ foreach {tn create_table} {
 }
 
 finish_test
-
diff --git a/test/hook.test b/test/hook.test
index 0b72b2dcff..1dba87f272 100644
--- a/test/hook.test
+++ b/test/hook.test
@@ -1015,4 +1015,3 @@ do_catchsql_test 12.6 {
 } {1 {UNIQUE constraint failed: t4.a}}
 
 finish_test
-
diff --git a/test/in4.test b/test/in4.test
index bbb32d8a7a..de8c2d6dbc 100644
--- a/test/in4.test
+++ b/test/in4.test
@@ -330,7 +330,7 @@ do_execsql_test in4-6.1 {
 do_execsql_test in4-6.1-eqp {
   EXPLAIN QUERY PLAN
   SELECT * FROM t6a, t6b WHERE a=3 AND b IN (c);
-} {~/SCAN TABLE t6a/}
+} {~/SCAN t6a/}
 do_execsql_test in4-6.2 {
   SELECT * FROM t6a, t6b WHERE a=3 AND c IN (b);
 } {3 4 4 44}
diff --git a/test/index6.test b/test/index6.test
index d385692584..d22c4d47df 100644
--- a/test/index6.test
+++ b/test/index6.test
@@ -158,7 +158,7 @@ do_test index6-2.2 {
     EXPLAIN QUERY PLAN
     SELECT * FROM t2 WHERE a=5;
   }
-} {/.* TABLE t2 USING INDEX t2a1 .*/}
+} {/(SEARCH|SCAN) t2 USING INDEX t2a1 /}
 ifcapable stat4 {
   execsql ANALYZE
   do_test index6-2.3stat4 {
@@ -166,21 +166,21 @@ ifcapable stat4 {
       EXPLAIN QUERY PLAN
       SELECT * FROM t2 WHERE a IS NOT NULL;
     }
-  } {/.* TABLE t2 USING INDEX t2a1 .*/}
+  } {/(SEARCH|SCAN) t2 USING INDEX t2a1 /}
 } else {
   do_test index6-2.3stat4 {
     execsql {
       EXPLAIN QUERY PLAN
       SELECT * FROM t2 WHERE a IS NOT NULL AND a>0;
     }
-  } {/.* TABLE t2 USING INDEX t2a1 .*/}
+  } {/(SEARCH|SCANE) t2 USING INDEX t2a1 /}
 }
 do_test index6-2.4 {
   execsql {
     EXPLAIN QUERY PLAN
     SELECT * FROM t2 WHERE a IS NULL;
   }
-} {~/.*INDEX t2a1.*/}
+} {~/INDEX t2a1/}
 
 do_execsql_test index6-2.101 {
   DROP INDEX t2a1;
@@ -319,8 +319,8 @@ do_eqp_test index6-8.1 {
   SELECT * FROM t8a LEFT JOIN t8b ON (x = 'value' AND y = a)
 } {
   QUERY PLAN
-  |--SCAN TABLE t8a
-  `--SEARCH TABLE t8b USING INDEX i8c (y=?)
+  |--SCAN t8a
+  `--SEARCH t8b USING INDEX i8c (y=?)
 }
 
 do_execsql_test index6-8.2 {
diff --git a/test/index7.test b/test/index7.test
index 084e8c3c7d..eeb36bab5c 100644
--- a/test/index7.test
+++ b/test/index7.test
@@ -113,7 +113,7 @@ do_execsql_test index7-1.7 {
 do_execsql_test index7-1.7eqp {
   EXPLAIN QUERY PLAN
   SELECT b FROM t1 WHERE a NOT LIKE 'abc%' AND a=7 ORDER BY +b;
-} {/SEARCH TABLE t1 USING COVERING INDEX bad1 /}
+} {/SEARCH t1 USING COVERING INDEX bad1 /}
 do_execsql_test index7-1.8 {
   DELETE FROM t1 WHERE c>=101;
   DROP INDEX IF EXISTS bad1;
@@ -202,28 +202,28 @@ do_test index7-2.2 {
     EXPLAIN QUERY PLAN
     SELECT * FROM t2 WHERE a=5;
   }
-} {/.* TABLE t2 USING COVERING INDEX t2a1 .*/}
+} {/(SCAN|SEARCH) t2 USING COVERING INDEX t2a1 /}
 ifcapable stat4 {
   do_test index7-2.3stat4 {
     execsql {
       EXPLAIN QUERY PLAN
       SELECT * FROM t2 WHERE a IS NOT NULL;
     }
-  } {/.* TABLE t2 USING COVERING INDEX t2a1 .*/}
+  } {/(SCAN|SEARCH) t2 USING COVERING INDEX t2a1 /}
 } else {
   do_test index7-2.3stat4 {
     execsql {
       EXPLAIN QUERY PLAN
       SELECT * FROM t2 WHERE a IS NOT NULL AND a>0;
     }
-  } {/.* TABLE t2 USING COVERING INDEX t2a1 .*/}
+  } {/(SCAN|SEARCH) t2 USING COVERING INDEX t2a1 /}
 }
 do_test index7-2.4 {
   execsql {
     EXPLAIN QUERY PLAN
     SELECT * FROM t2 WHERE a IS NULL;
   }
-} {~/.*INDEX t2a1.*/}
+} {~/INDEX t2a1/}
 
 do_execsql_test index7-2.101 {
   DROP INDEX t2a1;
@@ -321,7 +321,7 @@ do_execsql_test index7-6.3 {
 }
 do_eqp_test index7-6.4 {
   SELECT * FROM v4 WHERE d='xyz' AND c='def'
-} {SEARCH TABLE t4 USING INDEX i4 (c=?)}
+} {SEARCH t4 USING INDEX i4 (c=?)}
 
 do_catchsql_test index7-6.5 {
   CREATE INDEX t5a ON t5(a) WHERE a=#1;
@@ -349,7 +349,7 @@ do_execsql_test index7-8.1 {
   INSERT INTO t1(x) VALUES(1),(2);
   ANALYZE;
   EXPLAIN QUERY PLAN SELECT 1 FROM t1 WHERE y=5;
-} {/SEARCH TABLE t1 USING COVERING INDEX t1y/}
+} {/SEARCH t1 USING COVERING INDEX t1y/}
 
 
 finish_test
diff --git a/test/index8.test b/test/index8.test
index bb58228527..41ccf4bbcf 100644
--- a/test/index8.test
+++ b/test/index8.test
@@ -41,7 +41,7 @@ do_execsql_test 1.0 {
 do_execsql_test 1.0eqp {
   EXPLAIN QUERY PLAN
   SELECT * FROM t1 WHERE c=4 ORDER BY a, b LIMIT 2;
-} {/SCAN TABLE t1 USING INDEX t1abc/}
+} {/SCAN t1 USING INDEX t1abc/}
 
 # If we change the index so that it no longer covers the WHERE clause,
 # then we should (correctly) revert to using a table scan.
diff --git a/test/indexedby.test b/test/indexedby.test
index 41a52d8224..6a371112b3 100644
--- a/test/indexedby.test
+++ b/test/indexedby.test
@@ -42,16 +42,16 @@ proc EQP {sql} {
 #
 do_eqp_test indexedby-1.2 {
   select * from t1 WHERE a = 10; 
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 do_eqp_test indexedby-1.3 {
   select * from t1 ; 
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test indexedby-1.4 {
   select * from t1, t2 WHERE c = 10; 
 } {
   QUERY PLAN
-  |--SEARCH TABLE t2 USING INDEX i3 (c=?)
-  `--SCAN TABLE t1
+  |--SEARCH t2 USING INDEX i3 (c=?)
+  `--SCAN t1
 }
 
 # Parser tests. Test that an INDEXED BY or NOT INDEX clause can be 
@@ -118,21 +118,21 @@ do_test indexedby-2.7 {
 #
 do_eqp_test indexedby-3.1 {
   SELECT * FROM t1 WHERE a = 'one' AND b = 'two'
-} {/SEARCH TABLE t1 USING INDEX/}
+} {/SEARCH t1 USING INDEX/}
 do_eqp_test indexedby-3.1.1 {
   SELECT * FROM t1 NOT INDEXED WHERE a = 'one' AND b = 'two'
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test indexedby-3.1.2 {
   SELECT * FROM t1 NOT INDEXED WHERE rowid=1
-} {/SEARCH TABLE t1 USING INTEGER PRIMARY KEY .rowid=/}
+} {/SEARCH t1 USING INTEGER PRIMARY KEY .rowid=/}
 
 
 do_eqp_test indexedby-3.2 {
   SELECT * FROM t1 INDEXED BY i1 WHERE a = 'one' AND b = 'two'
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 do_eqp_test indexedby-3.3 {
   SELECT * FROM t1 INDEXED BY i2 WHERE a = 'one' AND b = 'two'
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
 do_test indexedby-3.4 {
   catchsql { SELECT * FROM t1 INDEXED BY i2 WHERE a = 'one' }
 } {0 {}}
@@ -148,10 +148,10 @@ do_test indexedby-3.7 {
 
 do_eqp_test indexedby-3.8 {
   SELECT * FROM t3 INDEXED BY sqlite_autoindex_t3_1 ORDER BY e 
-} {SCAN TABLE t3 USING INDEX sqlite_autoindex_t3_1}
+} {SCAN t3 USING INDEX sqlite_autoindex_t3_1}
 do_eqp_test indexedby-3.9 {
   SELECT * FROM t3 INDEXED BY sqlite_autoindex_t3_1 WHERE e = 10 
-} {SEARCH TABLE t3 USING INDEX sqlite_autoindex_t3_1 (e=?)}
+} {SEARCH t3 USING INDEX sqlite_autoindex_t3_1 (e=?)}
 do_test indexedby-3.10 {
   catchsql { SELECT * FROM t3 INDEXED BY sqlite_autoindex_t3_1 WHERE f = 10 }
 } {0 {}}
@@ -165,15 +165,15 @@ do_eqp_test indexedby-4.1 {
   SELECT * FROM t1, t2 WHERE a = c 
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SEARCH TABLE t2 USING INDEX i3 (c=?)
+  |--SCAN t1
+  `--SEARCH t2 USING INDEX i3 (c=?)
 }
 do_eqp_test indexedby-4.2 {
   SELECT * FROM t1 INDEXED BY i1, t2 WHERE a = c 
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING INDEX i1
-  `--SEARCH TABLE t2 USING INDEX i3 (c=?)
+  |--SCAN t1 USING INDEX i1
+  `--SEARCH t2 USING INDEX i3 (c=?)
 }
 do_test indexedby-4.3 {
   catchsql {
@@ -193,10 +193,10 @@ do_test indexedby-4.4 {
 do_execsql_test indexedby-5.1 {
   CREATE VIEW v2 AS SELECT * FROM t1 INDEXED BY i1 WHERE a > 5;
   EXPLAIN QUERY PLAN SELECT * FROM v2 
-} {/*SEARCH TABLE t1 USING INDEX i1 (a>?)*/}
+} {/*SEARCH t1 USING INDEX i1 (a>?)*/}
 do_execsql_test indexedby-5.2 {
   EXPLAIN QUERY PLAN SELECT * FROM v2 WHERE b = 10 
-} {/*SEARCH TABLE t1 USING INDEX i1 (a>?)*/}
+} {/*SEARCH t1 USING INDEX i1 (a>?)*/}
 do_test indexedby-5.3 {
   execsql { DROP INDEX i1 }
   catchsql { SELECT * FROM v2 }
@@ -217,10 +217,10 @@ do_test indexedby-5.5 {
 # 
 do_eqp_test indexedby-6.1 {
   SELECT * FROM t1 WHERE b = 10 ORDER BY rowid 
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
 do_eqp_test indexedby-6.2 {
   SELECT * FROM t1 NOT INDEXED WHERE b = 10 ORDER BY rowid 
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 # EVIDENCE-OF: R-40297-14464 The INDEXED BY phrase forces the SQLite
 # query planner to use a particular named index on a DELETE, SELECT, or
@@ -230,19 +230,19 @@ do_eqp_test indexedby-6.2 {
 # 
 do_eqp_test indexedby-7.1 {
   DELETE FROM t1 WHERE a = 5 
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 do_eqp_test indexedby-7.2 {
   DELETE FROM t1 NOT INDEXED WHERE a = 5 
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test indexedby-7.3 {
   DELETE FROM t1 INDEXED BY i1 WHERE a = 5 
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 do_eqp_test indexedby-7.4 {
   DELETE FROM t1 INDEXED BY i1 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 do_eqp_test indexedby-7.5 {
   DELETE FROM t1 INDEXED BY i2 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
 do_test indexedby-7.6 {
   catchsql { DELETE FROM t1 INDEXED BY i2 WHERE a = 5}
 } {0 {}}
@@ -251,19 +251,19 @@ do_test indexedby-7.6 {
 # 
 do_eqp_test indexedby-8.1 {
   UPDATE t1 SET rowid=rowid+1 WHERE a = 5 
-} {SEARCH TABLE t1 USING COVERING INDEX i1 (a=?)}
+} {SEARCH t1 USING COVERING INDEX i1 (a=?)}
 do_eqp_test indexedby-8.2 {
   UPDATE t1 NOT INDEXED SET rowid=rowid+1 WHERE a = 5 
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test indexedby-8.3 {
   UPDATE t1 INDEXED BY i1 SET rowid=rowid+1 WHERE a = 5 
-} {SEARCH TABLE t1 USING COVERING INDEX i1 (a=?)}
+} {SEARCH t1 USING COVERING INDEX i1 (a=?)}
 do_eqp_test indexedby-8.4 {
   UPDATE t1 INDEXED BY i1 SET rowid=rowid+1 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
 do_eqp_test indexedby-8.5 {
   UPDATE t1 INDEXED BY i2 SET rowid=rowid+1 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
 do_test indexedby-8.6 {
   catchsql { UPDATE t1 INDEXED BY i2 SET rowid=rowid+1 WHERE a = 5}
 } {0 {}}
@@ -338,7 +338,7 @@ do_execsql_test 11.4 {
 } {1 1 3}
 do_eqp_test 11.5 {
   SELECT a,b,rowid FROM x1 INDEXED BY x1i WHERE a=1 AND b=1 AND rowid='3.0';
-} {SEARCH TABLE x1 USING COVERING INDEX x1i (a=? AND b=? AND rowid=?)}
+} {SEARCH x1 USING COVERING INDEX x1i (a=? AND b=? AND rowid=?)}
 
 do_execsql_test 11.6 {
   CREATE TABLE x2(c INTEGER PRIMARY KEY, a, b TEXT);
@@ -359,7 +359,7 @@ do_execsql_test 11.9 {
 } {1 1 3}
 do_eqp_test 11.10 {
   SELECT a,b,c FROM x2 INDEXED BY x2i WHERE a=1 AND b=1 AND c='3.0';
-} {SEARCH TABLE x2 USING COVERING INDEX x2i (a=? AND b=? AND rowid=?)}
+} {SEARCH x2 USING COVERING INDEX x2i (a=? AND b=? AND rowid=?)}
 
 #-------------------------------------------------------------------------
 # Check INDEXED BY works (throws an exception) with partial indexes that 
diff --git a/test/indexexpr1.test b/test/indexexpr1.test
index 19c2573509..a31b876955 100644
--- a/test/indexexpr1.test
+++ b/test/indexexpr1.test
@@ -97,14 +97,14 @@ do_execsql_test indexexpr1-170 {
 do_execsql_test indexexpr1-170eqp {
   EXPLAIN QUERY PLAN
   SELECT length(a) FROM t1 ORDER BY length(a);
-} {/SCAN TABLE t1 USING INDEX t1alen/}
+} {/SCAN t1 USING INDEX t1alen/}
 do_execsql_test indexexpr1-171 {
   SELECT length(a) FROM t1 ORDER BY length(a) DESC;
 } {52 38 29 27 25 20}
 do_execsql_test indexexpr1-171eqp {
   EXPLAIN QUERY PLAN
   SELECT length(a) FROM t1 ORDER BY length(a) DESC;
-} {/SCAN TABLE t1 USING INDEX t1alen/}
+} {/SCAN t1 USING INDEX t1alen/}
 
 do_execsql_test indexexpr1-200 {
   DROP TABLE t1;
diff --git a/test/indexexpr2.test b/test/indexexpr2.test
index 35caef3c24..8c1171e038 100644
--- a/test/indexexpr2.test
+++ b/test/indexexpr2.test
@@ -93,7 +93,7 @@ ifcapable json1 {
     ORDER BY json_extract(x, '$.b') COLLATE nocase;
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--SCAN TABLE t2
+    |--SCAN t2
     `--USE TEMP B-TREE FOR GROUP BY
   }]
   
@@ -108,7 +108,7 @@ ifcapable json1 {
     ORDER BY json_extract(x, '$.b') COLLATE nocase;
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--SEARCH TABLE t3 USING INDEX i3 (<expr>=?)
+    |--SEARCH t3 USING INDEX i3 (<expr>=?)
     `--USE TEMP B-TREE FOR GROUP BY
   }]
 }
@@ -154,7 +154,7 @@ do_execsql_test 3.4.5 {
 do_execsql_test 3.4.5eqp {
   EXPLAIN QUERY PLAN
   SELECT * FROM t4 ORDER BY Substr(a,-2) COLLATE nocase;
-} {/SCAN TABLE t4 USING INDEX i4/}
+} {/SCAN t4 USING INDEX i4/}
 do_execsql_test 3.4.6 {
   SELECT * FROM t4 ORDER BY Substr(a,-2) COLLATE binary;
 } {.ABC1 1 .ABC3 3 .abc2 2 .abc4 4}
@@ -265,7 +265,7 @@ do_execsql_test 6.1.2 {
 } {1 123   2 123   3 123abc  4 123.0}
 do_eqp_test 6.1.3 {
   SELECT a, b FROM x1 WHERE CAST(b AS INTEGER) = 123;
-} {SEARCH TABLE x1 USING INDEX x1i (<expr>=?)}
+} {SEARCH x1 USING INDEX x1i (<expr>=?)}
 
 do_execsql_test 6.2.1 {
   SELECT a, b FROM x1 WHERE CAST(b AS TEXT) = 123;
@@ -276,7 +276,7 @@ do_execsql_test 6.2.2 {
 } {1 123   2 123}
 do_eqp_test 6.2.3 {
   SELECT a, b FROM x1 WHERE CAST(b AS TEXT) = 123;
-} {SEARCH TABLE x1 USING INDEX x1i2 (<expr>=?)}
+} {SEARCH x1 USING INDEX x1i2 (<expr>=?)}
 
 do_execsql_test 7.0 {
   CREATE TABLE IF NOT EXISTS t0(c0);
diff --git a/test/intpkey.test b/test/intpkey.test
index a56cab4c69..d6b8833a27 100644
--- a/test/intpkey.test
+++ b/test/intpkey.test
@@ -129,7 +129,7 @@ do_test intpkey-1.12.2 {
     EXPLAIN QUERY PLAN
     SELECT * FROM t1 WHERE a==4;
   }
-} {/SEARCH TABLE t1 /}
+} {/SEARCH t1 /}
 
 # Try to insert a non-integer value into the primary key field.  This
 # should result in a data type mismatch.
diff --git a/test/join2.test b/test/join2.test
index f004fda071..170000ca27 100644
--- a/test/join2.test
+++ b/test/join2.test
@@ -113,16 +113,16 @@ do_eqp_test 3.1 {
   SELECT v2 FROM t1 LEFT JOIN t2 USING (k2) LEFT JOIN t3_1 USING (k3);
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_eqp_test 3.2 {
   SELECT v2 FROM t1 LEFT JOIN t2 USING (k2) LEFT JOIN t3_2 USING (k3);
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
-  `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t1
+  `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 #-------------------------------------------------------------------------
@@ -161,16 +161,16 @@ do_eqp_test 4.1.5 {
   SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v2);
 } {
   QUERY PLAN
-  |--SCAN TABLE c1
-  |--SEARCH TABLE c2 USING INTEGER PRIMARY KEY (rowid=?)
-  `--SEARCH TABLE c3 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN c1
+  |--SEARCH c2 USING INTEGER PRIMARY KEY (rowid=?)
+  `--SEARCH c3 USING INTEGER PRIMARY KEY (rowid=?)
 }
 do_eqp_test 4.1.6 {
   SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v1+1);
 } {
   QUERY PLAN
-  |--SCAN TABLE c1
-  `--SEARCH TABLE c3 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN c1
+  `--SEARCH c3 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_execsql_test 4.2.0 {
@@ -208,16 +208,16 @@ do_eqp_test 4.2.5 {
   SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v2);
 } {
   QUERY PLAN
-  |--SCAN TABLE c1
-  |--SEARCH TABLE c2 USING INDEX sqlite_autoindex_c2_1 (k=?)
-  `--SEARCH TABLE c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
+  |--SCAN c1
+  |--SEARCH c2 USING INDEX sqlite_autoindex_c2_1 (k=?)
+  `--SEARCH c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
 }
 do_eqp_test 4.2.6 {
   SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v1+1);
 } {
   QUERY PLAN
-  |--SCAN TABLE c1
-  `--SEARCH TABLE c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
+  |--SCAN c1
+  `--SEARCH c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
 }
 
 # 2017-11-23 (Thanksgiving day)
@@ -251,11 +251,11 @@ do_execsql_test 5.0 {
 }
 do_eqp_test 5.1 {
   SELECT s1.a FROM s1 left join s2 using (a);
-} {SCAN TABLE s1}
+} {SCAN s1}
 
 do_eqp_test 5.2 {
   SELECT s1.a FROM s1 left join s3 using (a);
-} {SCAN TABLE s1}
+} {SCAN s1}
 
 do_execsql_test 6.0 {
   CREATE TABLE u1(a INTEGER PRIMARY KEY, b, c);
@@ -264,7 +264,7 @@ do_execsql_test 6.0 {
 }
 do_eqp_test 6.1 {
   SELECT u2.* FROM u2 LEFT JOIN u1 ON( u1.a=u2.a AND u1.b=u2.b AND u1.c=u2.c );
-} {SCAN TABLE u2}
+} {SCAN u2}
 
 db close
 sqlite3 db :memory:
diff --git a/test/join5.test b/test/join5.test
index 6724419e6d..e2ff2f6c27 100644
--- a/test/join5.test
+++ b/test/join5.test
@@ -277,12 +277,12 @@ do_eqp_test 7.2 {
   );
 } {
   QUERY PLAN
-  |--SCAN TABLE t1
+  |--SCAN t1
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SEARCH TABLE t2 USING INDEX t2xy (x=? AND y=?)
+     |  `--SEARCH t2 USING INDEX t2xy (x=? AND y=?)
      `--INDEX 2
-        `--SEARCH TABLE t2 USING INDEX t2xy (x=? AND y=?)
+        `--SEARCH t2 USING INDEX t2xy (x=? AND y=?)
 }
 
 do_execsql_test 7.3 {
@@ -302,8 +302,8 @@ do_eqp_test 7.4 {
   SELECT * FROM t3 LEFT JOIN t4 ON (t4.x = t3.x) WHERE (t4.y = ? OR t4.z = ?);
 } {
   QUERY PLAN
-  |--SCAN TABLE t3
-  `--SEARCH TABLE t4 USING INDEX t4xz (x=?)
+  |--SCAN t3
+  `--SEARCH t4 USING INDEX t4xz (x=?)
 } 
 
 reset_db
diff --git a/test/like.test b/test/like.test
index 8ea7cff782..ba9c15afcf 100644
--- a/test/like.test
+++ b/test/like.test
@@ -168,13 +168,13 @@ proc queryplan {sql} {
   set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
   # puts eqp=$eqp
   foreach {a b c x} $eqp {
-    if {[regexp { TABLE (\w+ AS )?(\w+) USING COVERING INDEX (\w+)\y} \
-        $x all as tab idx]} {
+    if {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING COVERING INDEX (\w+)\y} \
+        $x all ss as tab idx]} {
       lappend data {} $idx
-    } elseif {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
-        $x all as tab idx]} {
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+        $x all ss as tab idx]} {
       lappend data $tab $idx
-    } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
       lappend data $tab *
     }
   }
@@ -726,7 +726,7 @@ ifcapable like_opt&&!icu {
       set res [sqlite3_exec_hex db {
          EXPLAIN QUERY PLAN SELECT x FROM t2 WHERE x LIKE '%ff%25'
       }]
-      regexp {SCAN TABLE t2} $res
+      regexp {SCAN t2} $res
     } {1}
   }
   do_test like-9.5.1 {
diff --git a/test/like3.test b/test/like3.test
index 3bfe30c318..a93e113d62 100644
--- a/test/like3.test
+++ b/test/like3.test
@@ -125,7 +125,7 @@ do_eqp_test like3-5.101 {
   SELECT x FROM t5a WHERE x LIKE '/%';
 } {
   QUERY PLAN
-  `--SCAN TABLE t5a
+  `--SCAN t5a
 }
 do_execsql_test like3-5.110 {
   SELECT x FROM t5a WHERE x LIKE '/a%';
@@ -135,7 +135,7 @@ do_eqp_test like3-5.111 {
   SELECT x FROM t5a WHERE x LIKE '/a%';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t5a USING COVERING INDEX sqlite_autoindex_t5a_1 (x>? AND x<?)
+  `--SEARCH t5a USING COVERING INDEX sqlite_autoindex_t5a_1 (x>? AND x<?)
 }
 }
 do_execsql_test like3-5.120 {
@@ -145,7 +145,7 @@ do_eqp_test like3-5.121 {
   SELECT x FROM t5a WHERE x LIKE '^12%' ESCAPE '^';
 } {
   QUERY PLAN
-  `--SCAN TABLE t5a
+  `--SCAN t5a
 }
 do_execsql_test like3-5.122 {
   SELECT x FROM t5a WHERE x LIKE '^-2%' ESCAPE '^';
@@ -154,7 +154,7 @@ do_eqp_test like3-5.123 {
   SELECT x FROM t5a WHERE x LIKE '^12%' ESCAPE '^';
 } {
   QUERY PLAN
-  `--SCAN TABLE t5a
+  `--SCAN t5a
 }
 
 do_execsql_test like3-5.200 {
@@ -166,7 +166,7 @@ do_eqp_test like3-5.201 {
   SELECT x FROM t5b WHERE x GLOB '/*';
 } {
   QUERY PLAN
-  `--SCAN TABLE t5b
+  `--SCAN t5b
 }
 do_execsql_test like3-5.210 {
   SELECT x FROM t5b WHERE x GLOB '/a*';
@@ -175,7 +175,7 @@ do_eqp_test like3-5.211 {
   SELECT x FROM t5b WHERE x GLOB '/a*';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t5b USING COVERING INDEX sqlite_autoindex_t5b_1 (x>? AND x<?)
+  `--SEARCH t5b USING COVERING INDEX sqlite_autoindex_t5b_1 (x>? AND x<?)
 }
 
 # 2019-05-01
@@ -234,13 +234,13 @@ do_eqp_test like3-6.110 {
   SELECT * FROM t1 WHERE path LIKE 'a%';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t1 USING PRIMARY KEY (path>? AND path<?)
+  `--SEARCH t1 USING PRIMARY KEY (path>? AND path<?)
 }
 do_eqp_test like3-6.120 {
   SELECT * FROM t1 WHERE path LIKE 'a%' ESCAPE 'x';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t1 USING PRIMARY KEY (path>? AND path<?)
+  `--SEARCH t1 USING PRIMARY KEY (path>? AND path<?)
 }
 do_execsql_test like3-6.200 {
   DROP TABLE IF EXISTS t2;
@@ -252,26 +252,26 @@ do_eqp_test like3-6.210 {
   SELECT * FROM t2 WHERE path LIKE 'a%';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING INDEX t2path (path>? AND path<?)
+  `--SEARCH t2 USING INDEX t2path (path>? AND path<?)
 }
 do_eqp_test like3-6.220 {
   SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '\';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING INDEX t2path (path>? AND path<?)
+  `--SEARCH t2 USING INDEX t2path (path>? AND path<?)
 }
 db eval {PRAGMA case_sensitive_like=ON}
 do_eqp_test like3-6.230 {
   SELECT * FROM t2 WHERE path LIKE 'a%';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
+  `--SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
 }
 do_eqp_test like3-6.240 {
   SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '\';
 } {
   QUERY PLAN
-  `--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
+  `--SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
 }
 }
 
diff --git a/test/mallocK.test b/test/mallocK.test
index 139644d834..567a4c1f9d 100644
--- a/test/mallocK.test
+++ b/test/mallocK.test
@@ -123,7 +123,7 @@ ifcapable stat4 {
     SELECT DISTINCT c FROM t3 WHERE b BETWEEN '.xx..' AND '.xxxx';
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--SEARCH TABLE t3 USING INDEX i3 (ANY(a) AND b>? AND b<?)
+    |--SEARCH t3 USING INDEX i3 (ANY(a) AND b>? AND b<?)
     `--USE TEMP B-TREE FOR DISTINCT
   }]
 }
diff --git a/test/misc7.test b/test/misc7.test
index 25f96af34c..368a8c2781 100644
--- a/test/misc7.test
+++ b/test/misc7.test
@@ -280,19 +280,19 @@ ifcapable explain {
     SELECT * FROM abc AS t2 WHERE rowid = 1;
   } {
   QUERY PLAN
-  `--SEARCH TABLE abc AS t2 USING INTEGER PRIMARY KEY (rowid=?)
+  `--SEARCH abc AS t2 USING INTEGER PRIMARY KEY (rowid=?)
 }
   do_eqp_test misc7-14.2 {
     SELECT * FROM abc AS t2 WHERE a = 1;
 } {
   QUERY PLAN
-  `--SEARCH TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1 (a=?)
+  `--SEARCH abc AS t2 USING INDEX sqlite_autoindex_abc_1 (a=?)
 }
   do_eqp_test misc7-14.3 {
     SELECT * FROM abc AS t2 ORDER BY a;
   } {
   QUERY PLAN
-  `--SCAN TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1
+  `--SCAN abc AS t2 USING INDEX sqlite_autoindex_abc_1
 }
 }
 
diff --git a/test/notnull2.test b/test/notnull2.test
index 9ae190fe19..f9dfc0b304 100644
--- a/test/notnull2.test
+++ b/test/notnull2.test
@@ -98,4 +98,3 @@ do_execsql_test 2.1 {
 }
 
 finish_test
-
diff --git a/test/notnullfault.test b/test/notnullfault.test
index bf05dba9c0..0db8e4adbd 100644
--- a/test/notnullfault.test
+++ b/test/notnullfault.test
@@ -53,4 +53,3 @@ do_faultsim_test 2.1 -faults oom-t* -prep {
 }
 
 finish_test
-
diff --git a/test/nulls1.test b/test/nulls1.test
index b794f35b06..c44d0af251 100644
--- a/test/nulls1.test
+++ b/test/nulls1.test
@@ -184,7 +184,7 @@ do_eqp_test 5.3 {
   SELECT * FROM t4 WHERE a IN (1, 2, 3) ORDER BY a, b NULLS LAST
 } {
   QUERY PLAN
-  `--SEARCH TABLE t4 USING INDEX t4ab (a=?)
+  `--SEARCH t4 USING INDEX t4ab (a=?)
 }
 
 do_execsql_test 5.4 {
@@ -198,7 +198,7 @@ do_eqp_test 5.5 {
   SELECT * FROM t4 WHERE a IN (1, 2, 3) ORDER BY a DESC, b DESC NULLS FIRST
 } {
   QUERY PLAN
-  `--SEARCH TABLE t4 USING INDEX t4ab (a=?)
+  `--SEARCH t4 USING INDEX t4ab (a=?)
 }
 
 #-------------------------------------------------------------------------
@@ -224,7 +224,7 @@ do_eqp_test 6.1.2 {
   SELECT a,b FROM t5 WHERE a=1 ORDER BY b NULLS LAST, c;
 } {
   QUERY PLAN
-  `--SEARCH TABLE t5 USING COVERING INDEX t5ab (a=?)
+  `--SEARCH t5 USING COVERING INDEX t5ab (a=?)
 }
 do_execsql_test 6.2.1 {
   SELECT a,b FROM t5 WHERE a=1 ORDER BY b DESC NULLS FIRST, c DESC 
@@ -233,7 +233,7 @@ do_eqp_test 6.2.2 {
   SELECT a,b FROM t5 WHERE a=1 ORDER BY b DESC NULLS FIRST, c DESC 
 } {
   QUERY PLAN
-  `--SEARCH TABLE t5 USING COVERING INDEX t5ab (a=?)
+  `--SEARCH t5 USING COVERING INDEX t5ab (a=?)
 }
 
 #-------------------------------------------------------------------------
@@ -294,7 +294,7 @@ do_execsql_test 9.3 {
 do_eqp_test 9.4 {
   SELECT c1, c2, ifnull(c3, 'NULL') FROM v0 
   WHERE c2=10 ORDER BY c1, c3 NULLS LAST
-} {SEARCH TABLE v0 USING COVERING INDEX v3 (ANY(c1) AND c2=?)}
+} {SEARCH v0 USING COVERING INDEX v3 (ANY(c1) AND c2=?)}
 
 
 # 2020-03-01 ticket e12a0ae526bb51c7
diff --git a/test/orderby1.test b/test/orderby1.test
index 5152ffaf89..9b5df4c753 100644
--- a/test/orderby1.test
+++ b/test/orderby1.test
@@ -516,7 +516,7 @@ do_eqp_test 8.1 {
   SELECT * FROM t1 ORDER BY a, b;
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING INDEX i1
+  |--SCAN t1 USING INDEX i1
   `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
 }
 
diff --git a/test/returning1.test b/test/returning1.test
index 3c12536818..5044e53b08 100644
--- a/test/returning1.test
+++ b/test/returning1.test
@@ -116,4 +116,3 @@ do_execsql_test 5.5 {
 } {123}
 
 finish_test
-
diff --git a/test/rollback2.test b/test/rollback2.test
index 70aecc3377..21ebdeaca0 100644
--- a/test/rollback2.test
+++ b/test/rollback2.test
@@ -101,7 +101,7 @@ do_rollback_test 2.2 -setup {
 #
 do_eqp_test 3.1 {
   SELECT i FROM t1 WHERE (i%2)==0 ORDER BY h DESC;
-} {SCAN TABLE t1 USING INDEX i1}
+} {SCAN t1 USING INDEX i1}
 do_rollback_test 3.2 -setup {
   BEGIN;
     DELETE FROM t1 WHERE (i%2)==1;
@@ -131,7 +131,7 @@ do_execsql_test 4.1 { UPDATE t1 SET h = $leader || h; }
 
 do_eqp_test 4.2 {
   SELECT i FROM t1 WHERE (i%2)==0 ORDER BY h ASC;
-} {SCAN TABLE t1 USING INDEX i1}
+} {SCAN t1 USING INDEX i1}
 do_rollback_test 4.3 -setup {
   BEGIN;
     DELETE FROM t1 WHERE (i%2)==1;
diff --git a/test/rowvalue.test b/test/rowvalue.test
index b9967a865a..79cde62762 100644
--- a/test/rowvalue.test
+++ b/test/rowvalue.test
@@ -175,19 +175,19 @@ do_execsql_test 7.0 {
 
 foreach {tn sql res eqp} {
   1 "SELECT * FROM xy WHERE (i, j) IS (2, 2)" {2 2 2} 
-    "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid=?)"
+    "SEARCH xy USING INTEGER PRIMARY KEY (rowid=?)"
 
   2 "SELECT * FROM xy WHERE (k, j) < (2, 3)" {1 1 1 2 2 2}
-    "SCAN TABLE xy"
+    "SCAN xy"
 
   3 "SELECT * FROM xy WHERE (i, j) < (2, 3)" {1 1 1 2 2 2}
-    "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid<?)"
+    "SEARCH xy USING INTEGER PRIMARY KEY (rowid<?)"
 
   4 "SELECT * FROM xy WHERE (i, j) > (2, 1)" {2 2 2 3 3 3 4 4 4}
-    "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid>?)"
+    "SEARCH xy USING INTEGER PRIMARY KEY (rowid>?)"
 
   5 "SELECT * FROM xy WHERE (i, j) > ('2', 1)" {2 2 2 3 3 3 4 4 4}
-    "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid>?)"
+    "SEARCH xy USING INTEGER PRIMARY KEY (rowid>?)"
 
 } {
   do_eqp_test 7.$tn.1 $sql $eqp
diff --git a/test/rowvalue4.test b/test/rowvalue4.test
index 2929a97d10..784859cb19 100644
--- a/test/rowvalue4.test
+++ b/test/rowvalue4.test
@@ -185,31 +185,31 @@ ifcapable stat4 {
   }
 
   do_eqp_test 3.1.1 { SELECT * FROM c1 WHERE a=1 AND c=2 } \
-     {SEARCH TABLE c1 USING INDEX c1cd (c=?)}
+     {SEARCH c1 USING INDEX c1cd (c=?)}
 
   do_eqp_test 3.1.2 { SELECT * FROM c1 WHERE a=1 AND b>'d' AND c=2 } \
-     {SEARCH TABLE c1 USING INDEX c1cd (c=?)}
+     {SEARCH c1 USING INDEX c1cd (c=?)}
 
   do_eqp_test 3.1.3 { SELECT * FROM c1 WHERE a=1 AND b>'l' AND c=2 } \
-     {SEARCH TABLE c1 USING INDEX c1ab (a=? AND b>?)}
+     {SEARCH c1 USING INDEX c1ab (a=? AND b>?)}
 
   do_eqp_test 3.2.1 { SELECT * FROM c1 WHERE a=1 AND c>1 } \
-     {SEARCH TABLE c1 USING INDEX c1cd (c>?)}
+     {SEARCH c1 USING INDEX c1cd (c>?)}
 
   do_eqp_test 3.2.2 { SELECT * FROM c1 WHERE a=1 AND c>0 } \
-     {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+     {SEARCH c1 USING INDEX c1ab (a=?)}
 
   do_eqp_test 3.2.3 { SELECT * FROM c1 WHERE a=1 AND c>=1 } \
-     {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+     {SEARCH c1 USING INDEX c1ab (a=?)}
 
   do_eqp_test 3.2.4 { SELECT * FROM c1 WHERE a=1 AND (c, d)>(1, 'c') } \
-     {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+     {SEARCH c1 USING INDEX c1ab (a=?)}
 
   do_eqp_test 3.2.5 { SELECT * FROM c1 WHERE a=1 AND (c, d)>(1, 'o') } \
-     {SEARCH TABLE c1 USING INDEX c1cd ((c,d)>(?,?))}
+     {SEARCH c1 USING INDEX c1cd ((c,d)>(?,?))}
 
   do_eqp_test 3.2.6 { SELECT * FROM c1 WHERE a=1 AND (c, +b)>(1, 'c') } \
-     {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+     {SEARCH c1 USING INDEX c1ab (a=?)}
 
 }
 
@@ -234,11 +234,11 @@ do_eqp_test 5.1 {
     (c) IN (SELECT y FROM d1)
 } {
   QUERY PLAN
-  |--SEARCH TABLE d2 USING INDEX d2ab (a=? AND b=?)
+  |--SEARCH d2 USING INDEX d2ab (a=? AND b=?)
   |--LIST SUBQUERY xxxxxx
-  |  `--SCAN TABLE d1
+  |  `--SCAN d1
   `--LIST SUBQUERY xxxxxx
-     `--SCAN TABLE d1
+     `--SCAN d1
 }
 
 do_execsql_test 6.0 {
@@ -249,23 +249,23 @@ do_execsql_test 6.0 {
 
 do_eqp_test 6.1 {
   SELECT * FROM e1 WHERE (a, b) > (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1ab ((a,b)>(?,?))}
+} {SEARCH e1 USING INDEX e1ab ((a,b)>(?,?))}
 
 do_eqp_test 6.2 {
   SELECT * FROM e1 WHERE (a, b) < (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1ab ((a,b)<(?,?))}
+} {SEARCH e1 USING INDEX e1ab ((a,b)<(?,?))}
 
 do_eqp_test 6.3 {
   SELECT * FROM e1 WHERE c = ? AND (d, e) > (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1cde (c=? AND (d,e)>(?,?))}
+} {SEARCH e1 USING INDEX e1cde (c=? AND (d,e)>(?,?))}
 
 do_eqp_test 6.4 {
   SELECT * FROM e1 WHERE c = ? AND (d, e) < (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1cde (c=? AND (d,e)<(?,?))}
+} {SEARCH e1 USING INDEX e1cde (c=? AND (d,e)<(?,?))}
 
 do_eqp_test 6.5 {
   SELECT * FROM e1 WHERE (d, e) BETWEEN (?, ?) AND (?, ?) AND c = ?
-} {SEARCH TABLE e1 USING INDEX e1cde (c=? AND (d,e)>(?,?) AND (d,e)<(?,?))}
+} {SEARCH e1 USING INDEX e1cde (c=? AND (d,e)>(?,?) AND (d,e)<(?,?))}
 
 #-------------------------------------------------------------------------
 
diff --git a/test/scanstatus.test b/test/scanstatus.test
index 1b92ef3fe1..d01f7291dc 100644
--- a/test/scanstatus.test
+++ b/test/scanstatus.test
@@ -45,8 +45,8 @@ proc do_scanstatus_test {tn res} {
 
 do_execsql_test 1.1 { SELECT count(*) FROM t1, t2; } 6
 do_scanstatus_test 1.2 {
-  nLoop 1 nVisit 2 nEst 1048576.0 zName t1 zExplain {SCAN TABLE t1}
-  nLoop 2 nVisit 6 nEst 1048576.0 zName t2 zExplain {SCAN TABLE t2}
+  nLoop 1 nVisit 2 nEst 1048576.0 zName t1 zExplain {SCAN t1}
+  nLoop 2 nVisit 6 nEst 1048576.0 zName t2 zExplain {SCAN t2}
 }
 
 do_execsql_test 1.3 {
@@ -54,8 +54,8 @@ do_execsql_test 1.3 {
   SELECT count(*) FROM t1, t2;
 } 6
 do_scanstatus_test 1.4 {
-  nLoop 1 nVisit 2 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
-  nLoop 2 nVisit 6 nEst 3.0 zName t2 zExplain {SCAN TABLE t2}
+  nLoop 1 nVisit 2 nEst 2.0 zName t1 zExplain {SCAN t1}
+  nLoop 2 nVisit 6 nEst 3.0 zName t2 zExplain {SCAN t2}
 }
 
 do_execsql_test 1.5 { ANALYZE }
@@ -64,8 +64,8 @@ do_execsql_test 1.6 {
 } 4
 do_scanstatus_test 1.7 {
   nLoop 1 nVisit 2 nEst 2.0 zName t2 zExplain 
-  {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid>?)}
-  nLoop 2 nVisit 4 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
+  {SEARCH t2 USING INTEGER PRIMARY KEY (rowid>?)}
+  nLoop 2 nVisit 4 nEst 2.0 zName t1 zExplain {SCAN t1}
 }
 
 do_execsql_test 1.8 {
@@ -74,8 +74,8 @@ do_execsql_test 1.8 {
 
 do_scanstatus_test 1.9 {
   nLoop 2 nVisit 4 nEst 2.0 zName t2 zExplain 
-  {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid>?)}
-  nLoop 4 nVisit 8 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
+  {SEARCH t2 USING INTEGER PRIMARY KEY (rowid>?)}
+  nLoop 4 nVisit 8 nEst 2.0 zName t1 zExplain {SCAN t1}
 }
 
 do_test 1.9 {
@@ -84,8 +84,8 @@ do_test 1.9 {
 
 do_scanstatus_test 1.10 {
   nLoop 0 nVisit 0 nEst 2.0 zName t2 zExplain 
-  {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid>?)}
-  nLoop 0 nVisit 0 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
+  {SEARCH t2 USING INTEGER PRIMARY KEY (rowid>?)}
+  nLoop 0 nVisit 0 nEst 2.0 zName t1 zExplain {SCAN t1}
 }
 
 #-------------------------------------------------------------------------
@@ -105,7 +105,7 @@ do_execsql_test 2.1 {
 
 do_scanstatus_test 2.2 {
   nLoop 1 nVisit 1 nEst 1.0 zName x1 
-  zExplain {SEARCH TABLE x1 USING INTEGER PRIMARY KEY (rowid=?)}
+  zExplain {SEARCH x1 USING INTEGER PRIMARY KEY (rowid=?)}
 }
 
 do_execsql_test 2.3.1 {
@@ -113,7 +113,7 @@ do_execsql_test 2.3.1 {
 } {2 two}
 do_scanstatus_test 2.3.2 {
   nLoop 1 nVisit 1 nEst 10.0 zName x1j 
-  zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j=?)}
+  zExplain {SEARCH x1 USING COVERING INDEX x1j (j=?)}
 }
 
 do_execsql_test 2.4.1 {
@@ -121,7 +121,7 @@ do_execsql_test 2.4.1 {
 } {4 four 1 one 3 three}
 do_scanstatus_test 2.4.2 {
   nLoop 1 nVisit 3 nEst 262144.0 zName x1j 
-  zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j<?)}
+  zExplain {SEARCH x1 USING COVERING INDEX x1j (j<?)}
 }
 
 do_execsql_test 2.5.1 {
@@ -129,7 +129,7 @@ do_execsql_test 2.5.1 {
 } {2 two}
 do_scanstatus_test 2.5.2 {
   nLoop 1 nVisit 1 nEst 262144.0 zName x1j 
-  zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j>?)}
+  zExplain {SEARCH x1 USING COVERING INDEX x1j (j>?)}
 }
 
 do_execsql_test 2.6.1 {
@@ -137,7 +137,7 @@ do_execsql_test 2.6.1 {
 } {3 three 2 two}
 do_scanstatus_test 2.6.2 {
   nLoop 1 nVisit 2 nEst 16384.0 zName x1j 
-  zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j>? AND j<?)}
+  zExplain {SEARCH x1 USING COVERING INDEX x1j (j>? AND j<?)}
 }
 
 do_execsql_test 2.7.1 {
@@ -150,7 +150,7 @@ do_execsql_test 2.7.1 {
 
 do_scanstatus_test 2.7.2 {
   nLoop 1 nVisit 2 nEst 16384.0 zName x2j 
-  zExplain {SEARCH TABLE x2 USING INDEX x2j (j>? AND j<?)}
+  zExplain {SEARCH x2 USING INDEX x2j (j>? AND j<?)}
 }
 
 do_execsql_test 2.8.1 {
@@ -158,7 +158,7 @@ do_execsql_test 2.8.1 {
 }
 do_scanstatus_test 2.8.2 {
   nLoop 1 nVisit 0 nEst 8.0 zName x2ij 
-  zExplain {SEARCH TABLE x2 USING INDEX x2ij (i=? AND j=?)}
+  zExplain {SEARCH x2 USING INDEX x2ij (i=? AND j=?)}
 }
 
 do_execsql_test 2.9.1 {
@@ -166,7 +166,7 @@ do_execsql_test 2.9.1 {
 }
 do_scanstatus_test 2.9.2 {
   nLoop 1 nVisit 0 nEst 8.0 zName x2ij 
-  zExplain {SEARCH TABLE x2 USING INDEX x2ij (i=? AND j=?)}
+  zExplain {SEARCH x2 USING INDEX x2ij (i=? AND j=?)}
 }
 
 do_execsql_test 2.10.1 {
@@ -174,7 +174,7 @@ do_execsql_test 2.10.1 {
 } {3 three {3 three}}
 do_scanstatus_test 2.10.2 {
   nLoop 1 nVisit 1 nEst 8.0 zName x2ij 
-  zExplain {SEARCH TABLE x2 USING INDEX x2ij (i=? AND j=?)}
+  zExplain {SEARCH x2 USING INDEX x2ij (i=? AND j=?)}
 }
 
 #-------------------------------------------------------------------------
@@ -194,9 +194,9 @@ do_execsql_test 3.2.1 {
 } {4 13}
 do_scanstatus_test 3.2.2 {
   nLoop 1 nVisit 1 nEst 10.0 zName a1a 
-  zExplain {SEARCH TABLE a1 USING INDEX a1a (a=?)}
+  zExplain {SEARCH a1 USING INDEX a1a (a=?)}
   nLoop 1 nVisit 1 nEst 10.0 zName a1bc 
-  zExplain {SEARCH TABLE a1 USING INDEX a1bc (b=?)}
+  zExplain {SEARCH a1 USING INDEX a1bc (b=?)}
 }
 
 do_execsql_test 3.2.1 {
@@ -204,9 +204,9 @@ do_execsql_test 3.2.1 {
 } {30}
 do_scanstatus_test 3.2.2 {
   nLoop 1 nVisit 9 nEst 16384.0 zName a1a 
-  zExplain {SEARCH TABLE a1 USING INDEX a1a (a>? AND a<?)}
+  zExplain {SEARCH a1 USING INDEX a1a (a>? AND a<?)}
   nLoop 1 nVisit 21 nEst 16384.0 zName a1bc
-  zExplain {SEARCH TABLE a1 USING INDEX a1bc (b>? AND b<?)}
+  zExplain {SEARCH a1 USING INDEX a1bc (b>? AND b<?)}
 }
 
 do_execsql_test 3.3.1 {
@@ -215,9 +215,9 @@ do_execsql_test 3.3.1 {
 } {90}
 do_scanstatus_test 3.2.2 {
   nLoop 1 nVisit 10 nEst 16384.0 zName a1bc 
-  zExplain {SEARCH TABLE a1 AS y USING COVERING INDEX a1bc (b>? AND b<?)}
+  zExplain {SEARCH a1 AS y USING COVERING INDEX a1bc (b>? AND b<?)}
   nLoop 10 nVisit 90 nEst 16384.0 zName a1a
-  zExplain {SEARCH TABLE a1 AS x USING COVERING INDEX a1a (a>? AND a<?)}
+  zExplain {SEARCH a1 AS x USING COVERING INDEX a1a (a>? AND a<?)}
 }
 
 do_execsql_test 3.4.1 {
@@ -225,7 +225,7 @@ do_execsql_test 3.4.1 {
 } {4}
 do_scanstatus_test 3.4.2 {
   nLoop 1 nVisit 4 nEst 40.0 zName a1a 
-  zExplain {SEARCH TABLE a1 USING COVERING INDEX a1a (a=?)}
+  zExplain {SEARCH a1 USING COVERING INDEX a1a (a=?)}
 }
 
 do_execsql_test 3.4.1 {
@@ -233,7 +233,7 @@ do_execsql_test 3.4.1 {
 } {4}
 do_scanstatus_test 3.4.2 {
   nLoop 1 nVisit 4 nEst 4.0 zName a1
-  zExplain {SEARCH TABLE a1 USING INTEGER PRIMARY KEY (rowid=?)}
+  zExplain {SEARCH a1 USING INTEGER PRIMARY KEY (rowid=?)}
 }
 
 #-------------------------------------------------------------------------
@@ -266,9 +266,9 @@ do_execsql_test 4.2 {
 do_execsql_test    4.2.1 { DELETE FROM p1 WHERE x=4 }
 do_scanstatus_test 4.2.2 { 
   nLoop 1 nVisit 1 nEst 1.0 zName sqlite_autoindex_p1_1 
-  zExplain {SEARCH TABLE p1 USING INDEX sqlite_autoindex_p1_1 (x=?)}
+  zExplain {SEARCH p1 USING INDEX sqlite_autoindex_p1_1 (x=?)}
 
-  nLoop 1 nVisit 3 nEst 262144.0 zName c1 zExplain {SCAN TABLE c1}
+  nLoop 1 nVisit 3 nEst 262144.0 zName c1 zExplain {SCAN c1}
 }
 
 #-------------------------------------------------------------------------
@@ -313,9 +313,9 @@ do_execsql_test 5.1.1 {
 } {2}
 do_scanstatus_test 5.1.2 { 
   nLoop 1 nVisit 10 nEst 10.0 zName t1bc 
-  zExplain {SCAN TABLE t1 AS ii USING COVERING INDEX t1bc}
+  zExplain {SCAN t1 AS ii USING COVERING INDEX t1bc}
   nLoop 1 nVisit 2 nEst 8.0 zName sqlite_autoindex_t1_1
-  zExplain {SEARCH TABLE t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
+  zExplain {SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
 }
 
 do_execsql_test 5.2.1 {
@@ -323,51 +323,51 @@ do_execsql_test 5.2.1 {
 } {2}
 do_scanstatus_test 5.2.2 { 
   nLoop 1 nVisit 2 nEst 2.0 zName sqlite_autoindex_t1_1
-  zExplain {SEARCH TABLE t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
+  zExplain {SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
 }
 
 do_eqp_test 5.3.1 {
   SELECT count(*) FROM t2 WHERE y = 'j';
-} {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
+} {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
 do_execsql_test 5.3.2 {
   SELECT count(*) FROM t2 WHERE y = 'j';
 } {19}
 do_scanstatus_test 5.3.3 { 
   nLoop 1 nVisit 19 nEst 56.0 zName t2xy zExplain
-  {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
+  {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
 }
 
 do_eqp_test 5.4.1 {
   SELECT count(*) FROM t1, t2 WHERE y = c;
 } {
   QUERY PLAN
-  |--SCAN TABLE t1 USING COVERING INDEX t1bc
-  `--SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)
+  |--SCAN t1 USING COVERING INDEX t1bc
+  `--SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)
 }
 do_execsql_test 5.4.2 {
   SELECT count(*) FROM t1, t2 WHERE y = c;
 } {200}
 do_scanstatus_test 5.4.3 { 
   nLoop 1 nVisit 10 nEst 10.0 zName t1bc 
-  zExplain {SCAN TABLE t1 USING COVERING INDEX t1bc}
+  zExplain {SCAN t1 USING COVERING INDEX t1bc}
   nLoop 10 nVisit 200 nEst 56.0 zName t2xy 
-  zExplain {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
+  zExplain {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
 }
 
 do_eqp_test 5.5.1 {
   SELECT count(*) FROM t1, t3 WHERE y = c;
 } {
   QUERY PLAN
-  |--SCAN TABLE t3
-  `--SEARCH TABLE t1 USING AUTOMATIC COVERING INDEX (c=?)
+  |--SCAN t3
+  `--SEARCH t1 USING AUTOMATIC COVERING INDEX (c=?)
 }
 do_execsql_test 5.5.2 {
   SELECT count(*) FROM t1, t3 WHERE y = c;
 } {200}
 do_scanstatus_test 5.5.3 { 
-  nLoop 1 nVisit 501 nEst 480.0 zName t3 zExplain {SCAN TABLE t3}
+  nLoop 1 nVisit 501 nEst 480.0 zName t3 zExplain {SCAN t3}
   nLoop 501 nVisit 200 nEst 20.0 zName auto-index zExplain
-  {SEARCH TABLE t1 USING AUTOMATIC COVERING INDEX (c=?)}
+  {SEARCH t1 USING AUTOMATIC COVERING INDEX (c=?)}
 }
 
 #-------------------------------------------------------------------------
@@ -392,7 +392,7 @@ ifcapable fts3 {
   } {6}
   do_scanstatus_test 6.1.2 { 
     nLoop 1 nVisit 6 nEst 24.0 zName ft1 zExplain 
-    {SCAN TABLE ft1 VIRTUAL TABLE INDEX 3:}
+    {SCAN ft1 VIRTUAL TABLE INDEX 3:}
   }
 }
 
diff --git a/test/select9.test b/test/select9.test
index 4c42236dc8..bbed8e18fe 100644
--- a/test/select9.test
+++ b/test/select9.test
@@ -436,19 +436,19 @@ do_test select9-5.1 {
     EXPLAIN QUERY PLAN
        SELECT * FROM v5 WHERE x='12345' ORDER BY y;
   }
-} {~/SCAN TABLE/}  ;# Uses indices with "*"
+} {~/SCAN/}  ;# Uses indices with "*"
 do_test select9-5.2 {
   db eval {
     EXPLAIN QUERY PLAN
        SELECT x, y FROM v5 WHERE x='12345' ORDER BY y;
   }
-} {~/SCAN TABLE/}  ;# Uses indices with "x, y"
+} {~/SCAN/}  ;# Uses indices with "x, y"
 do_test select9-5.3 {
   db eval {
     EXPLAIN QUERY PLAN
        SELECT x, y FROM v5 WHERE +x='12345' ORDER BY y;
   }
-} {/SCAN TABLE/}   ;# Full table scan if the "+x" prevents index usage.
+} {/SCAN/}   ;# Full table scan if the "+x" prevents index usage.
 
 # 2013-07-09:  Ticket [490a4b7235624298]: 
 # "WHERE 0" on the first element of a UNION causes an assertion fault
diff --git a/test/selectA.test b/test/selectA.test
index 7ca0096b1d..aa4e2a7984 100644
--- a/test/selectA.test
+++ b/test/selectA.test
@@ -1339,10 +1339,10 @@ do_eqp_test 4.1.2 {
   QUERY PLAN
   `--MERGE (UNION ALL)
      |--LEFT
-     |  |--SCAN TABLE t5 USING INDEX i2
+     |  |--SCAN t5 USING INDEX i2
      |  `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
      `--RIGHT
-        |--SCAN TABLE t4 USING INDEX i1
+        |--SCAN t4 USING INDEX i1
         `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
 }
 
diff --git a/test/selectD.test b/test/selectD.test
index 9c09b2cca6..818d8ccc0b 100644
--- a/test/selectD.test
+++ b/test/selectD.test
@@ -169,6 +169,6 @@ do_execsql_test selectD-4.1 {
                WHERE x1.d>5
                GROUP BY x1.d) AS x2
                   ON t41.b=x2.d;
-} {/*SEARCH SUBQUERY * AS x2 USING AUTOMATIC*/}
+} {/SEARCH x2 USING AUTOMATIC/}
 
 finish_test
diff --git a/test/skipscan1.test b/test/skipscan1.test
index 367cd2a108..94062fb17e 100644
--- a/test/skipscan1.test
+++ b/test/skipscan1.test
@@ -341,7 +341,7 @@ optimization_control db skip-scan 0
 do_execsql_test skipscan1-9.3 {
   EXPLAIN QUERY PLAN
   SELECT  * FROM t9a WHERE b IN (SELECT x FROM t9b WHERE y!=5);
-} {/{SCAN TABLE t9a}/}
+} {/{SCAN t9a}/}
 optimization_control db skip-scan 1
 
 do_execsql_test skipscan1-2.1 {
@@ -394,7 +394,7 @@ do_eqp_test skipscan1-3.2 {
     FROM t1 WHERE t1.c3 = 1;
 } {
   QUERY PLAN
-  |--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (ANY(c4) AND c3=?)
+  |--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (ANY(c4) AND c3=?)
   `--USE TEMP B-TREE FOR DISTINCT
 }
 
diff --git a/test/skipscan2.test b/test/skipscan2.test
index 6fa04d54c6..47b2b3fffa 100644
--- a/test/skipscan2.test
+++ b/test/skipscan2.test
@@ -199,7 +199,7 @@ do_test skipscan2-3.2 {
 } {}
 do_eqp_test skipscan2-3.3eqp {
   SELECT * FROM t3 WHERE b=42;
-} {SEARCH TABLE t3 USING PRIMARY KEY (ANY(a) AND b=?)}
+} {SEARCH t3 USING PRIMARY KEY (ANY(a) AND b=?)}
 
 
 
diff --git a/test/skipscan5.test b/test/skipscan5.test
index c128e614c1..026356e6c0 100644
--- a/test/skipscan5.test
+++ b/test/skipscan5.test
@@ -41,20 +41,20 @@ do_test 1.2 {
 foreach {tn q res} {
   1  "b = 5"                   {/*ANY(a) AND b=?*/}
   2  "b > 12 AND b < 16"       {/*ANY(a) AND b>? AND b<?*/}
-  3  "b > 2 AND b < 16"        {/*SCAN TABLE t1*/}
+  3  "b > 2 AND b < 16"        {/*SCAN t1*/}
   4  "b > 18 AND b < 25"       {/*ANY(a) AND b>? AND b<?*/}
   5  "b > 16"                  {/*ANY(a) AND b>?*/}
-  6  "b > 5"                   {/*SCAN TABLE t1*/}
-  7  "b < 15"                  {/*SCAN TABLE t1*/}
+  6  "b > 5"                   {/*SCAN t1*/}
+  7  "b < 15"                  {/*SCAN t1*/}
   8  "b < 5"                   {/*ANY(a) AND b<?*/}
   9  "5 > b"                   {/*ANY(a) AND b<?*/}
   10 "b = '5'"                 {/*ANY(a) AND b=?*/}
   11 "b > '12' AND b < '16'"   {/*ANY(a) AND b>? AND b<?*/}
-  12 "b > '2' AND b < '16'"    {/*SCAN TABLE t1*/}
+  12 "b > '2' AND b < '16'"    {/*SCAN t1*/}
   13 "b > '18' AND b < '25'"   {/*ANY(a) AND b>? AND b<?*/}
   14 "b > '16'"                {/*ANY(a) AND b>?*/}
-  15 "b > '5'"                 {/*SCAN TABLE t1*/}
-  16 "b < '15'"                {/*SCAN TABLE t1*/}
+  15 "b > '5'"                 {/*SCAN t1*/}
+  16 "b < '15'"                {/*SCAN t1*/}
   17 "b < '5'"                 {/*ANY(a) AND b<?*/}
   18 "'5' > b"                 {/*ANY(a) AND b<?*/}
 } {
@@ -104,10 +104,10 @@ foreach {tn dbenc coll} {
 
   foreach {tn2 q res} {
     1 { c BETWEEN 'd' AND 'e' }       {/*ANY(a) AND ANY(b) AND c>? AND c<?*/}
-    2 { c BETWEEN 'b' AND 'r' }       {/*SCAN TABLE t2*/}
+    2 { c BETWEEN 'b' AND 'r' }       {/*SCAN t2*/}
     3 { c > 'q' }                     {/*ANY(a) AND ANY(b) AND c>?*/}
-    4 { c > 'e' }                     {/*SCAN TABLE t2*/}
-    5 { c < 'q' }                     {/*SCAN TABLE t2*/}
+    4 { c > 'e' }                     {/*SCAN t2*/}
+    5 { c < 'q' }                     {/*SCAN t2*/}
     6 { c < 'b' }                     {/*ANY(a) AND ANY(b) AND c<?*/}
   } {
     set sql "EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE $q" 
@@ -169,11 +169,11 @@ do_test 3.2 {
 
 foreach {tn q res} {
   1 "b BETWEEN -10000 AND -8000"       {/*ANY(a) AND b>? AND b<?*/}
-  2 "b BETWEEN -10000 AND 'qqq'"       {/*SCAN TABLE t3*/}
-  3 "b < X'5555'"                      {/*SCAN TABLE t3*/}
+  2 "b BETWEEN -10000 AND 'qqq'"       {/*SCAN t3*/}
+  3 "b < X'5555'"                      {/*SCAN t3*/}
   4 "b > X'5555'"                      {/*ANY(a) AND b>?*/}
   5 "b > 'zzz'"                        {/*ANY(a) AND b>?*/}
-  6 "b < 'zzz'"                        {/*SCAN TABLE t3*/}
+  6 "b < 'zzz'"                        {/*SCAN t3*/}
 } {
   set sql "EXPLAIN QUERY PLAN SELECT * FROM t3 WHERE $q" 
   do_execsql_test 3.3.$tn $sql $res
diff --git a/test/skipscan6.test b/test/skipscan6.test
index a53be1d952..4f592bc0e0 100644
--- a/test/skipscan6.test
+++ b/test/skipscan6.test
@@ -179,13 +179,13 @@ do_execsql_test 3.0 {
 #
 do_eqp_test 3.1 {
   SELECT * FROM t3 WHERE a = ? AND c = ?
-} {SEARCH TABLE t3 USING INDEX t3_a (a=?)}
+} {SEARCH t3 USING INDEX t3_a (a=?)}
 
 # The same query on table t2. This should use index "t2_a", for the
 # same reason. At one point though, it was mistakenly using a skip-scan.
 #
 do_eqp_test 3.2 {
   SELECT * FROM t2 WHERE a = ? AND c = ?
-} {SEARCH TABLE t2 USING INDEX t2_a (a=?)}
+} {SEARCH t2 USING INDEX t2_a (a=?)}
 
 finish_test
diff --git a/test/tkt-385a5b56b9.test b/test/tkt-385a5b56b9.test
index 22a9b38daf..4451389b1e 100644
--- a/test/tkt-385a5b56b9.test
+++ b/test/tkt-385a5b56b9.test
@@ -35,16 +35,16 @@ do_execsql_test 2.0 {
 }
 
 do_eqp_test 2.1 { SELECT DISTINCT x FROM t2 } \
-  {SCAN TABLE t2 USING COVERING INDEX t2x}
+  {SCAN t2 USING COVERING INDEX t2x}
 
 do_eqp_test 2.2 { SELECT DISTINCT y FROM t2 } \
-  {SCAN TABLE t2 USING COVERING INDEX t2y}
+  {SCAN t2 USING COVERING INDEX t2y}
 
 do_eqp_test 2.3 { SELECT DISTINCT x, y FROM t2 WHERE y=10 } \
-  {SEARCH TABLE t2 USING INDEX t2y (y=?)}
+  {SEARCH t2 USING INDEX t2y (y=?)}
 
 do_eqp_test 2.4 { SELECT DISTINCT x, y FROM t2 WHERE x=10 } \
-  {SEARCH TABLE t2 USING INDEX t2x (x=?)}
+  {SEARCH t2 USING INDEX t2x (x=?)}
 
 
 finish_test
diff --git a/test/tkt-78e04e52ea.test b/test/tkt-78e04e52ea.test
index a432e6c22b..1b49f5d6d2 100644
--- a/test/tkt-78e04e52ea.test
+++ b/test/tkt-78e04e52ea.test
@@ -42,7 +42,7 @@ do_test tkt-78e04-1.3 {
 } {}
 do_test tkt-78e04-1.4 {
  db eval {EXPLAIN QUERY PLAN SELECT "" FROM "" WHERE "" LIKE '1e5%';}
-} {/*SCAN TABLE  USING COVERING INDEX i1*/}
+} {/*SCAN  USING COVERING INDEX i1*/}
 do_test tkt-78e04-1.5 {
   execsql {
     DROP TABLE "";
@@ -55,12 +55,12 @@ do_test tkt-78e04-2.1 {
     CREATE INDEX "" ON t2(x);
     EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE x=5;
   }
-} {/*SEARCH TABLE t2 USING COVERING INDEX  (x=?)*/}
+} {/*SEARCH t2 USING COVERING INDEX  (x=?)*/}
 do_test tkt-78e04-2.2 {
   execsql {
     DROP INDEX "";
     EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE x=2;
   }
-} {/*SCAN TABLE t2*/}
+} {/*SCAN t2*/}
 
 finish_test
diff --git a/test/tkt-b75a9ca6b0.test b/test/tkt-b75a9ca6b0.test
index f5ae10eec0..f5c8804493 100644
--- a/test/tkt-b75a9ca6b0.test
+++ b/test/tkt-b75a9ca6b0.test
@@ -32,8 +32,8 @@ do_execsql_test 1.1 {
   CREATE INDEX i1 ON t1(x, y);
 } 
 
-set idxscan {SCAN TABLE t1 USING COVERING INDEX i1}
-set tblscan {SCAN TABLE t1}
+set idxscan {SCAN t1 USING COVERING INDEX i1}
+set tblscan {SCAN t1}
 set grpsort {USE TEMP B-TREE FOR GROUP BY}
 set sort    {USE TEMP B-TREE FOR ORDER BY}
 
diff --git a/test/tkt3442.test b/test/tkt3442.test
index 98a5e371c1..13d29a1b05 100644
--- a/test/tkt3442.test
+++ b/test/tkt3442.test
@@ -40,17 +40,17 @@ do_test tkt3442-1.1 {
 #
 do_eqp_test tkt3442-1.2 {
   SELECT node FROM listhash WHERE id='5000' LIMIT 1;
-} {SEARCH TABLE listhash USING INDEX ididx (id=?)}
+} {SEARCH listhash USING INDEX ididx (id=?)}
 do_eqp_test tkt3442-1.3 {
   SELECT node FROM listhash WHERE id="5000" LIMIT 1;
-} {SEARCH TABLE listhash USING INDEX ididx (id=?)}
+} {SEARCH listhash USING INDEX ididx (id=?)}
 
 
 # Some extra tests testing other permutations of 5000.
 #
 do_eqp_test tkt3442-1.4 {
   SELECT node FROM listhash WHERE id=5000 LIMIT 1;
-} {SEARCH TABLE listhash USING INDEX ididx (id=?)}
+} {SEARCH listhash USING INDEX ididx (id=?)}
 
 do_test tkt3442-1.5 {
   catchsql {
diff --git a/test/tpch01.test b/test/tpch01.test
index 0e51b82b08..338ac48a07 100644
--- a/test/tpch01.test
+++ b/test/tpch01.test
@@ -165,13 +165,13 @@ do_test tpch01-1.1 {
        order by
                o_year;}]
   set ::eqpres
-} {/*SEARCH TABLE part USING INDEX bootleg_pti *SEARCH TABLE lineitem USING INDEX lpki2*/}
+} {/*SEARCH part USING INDEX bootleg_pti *SEARCH lineitem USING INDEX lpki2*/}
 do_test tpch01-1.1b {
   set ::eqpres
-} {/.* customer .* nation AS n1 .*/}
+} {/.* customer .* n1 .*/}
 do_test tpch01-1.1c {
   set ::eqpres
-} {/.* supplier .* nation AS n2 .*/}
+} {/.* supplier .* n2 .*/}
 
 do_eqp_test tpch01-1.2 {
 select
@@ -189,10 +189,10 @@ order by
     revenue desc;
 } {
   QUERY PLAN
-  |--SEARCH TABLE orders USING INDEX odi (O_ORDERDATE>? AND O_ORDERDATE<?)
-  |--SEARCH TABLE customer USING INDEX cpki (C_CUSTKEY=?)
-  |--SEARCH TABLE nation USING INDEX npki (N_NATIONKEY=?)
-  |--SEARCH TABLE lineitem USING INDEX lpki (L_ORDERKEY=?)
+  |--SEARCH orders USING INDEX odi (O_ORDERDATE>? AND O_ORDERDATE<?)
+  |--SEARCH customer USING INDEX cpki (C_CUSTKEY=?)
+  |--SEARCH nation USING INDEX npki (N_NATIONKEY=?)
+  |--SEARCH lineitem USING INDEX lpki (L_ORDERKEY=?)
   |--USE TEMP B-TREE FOR GROUP BY
   `--USE TEMP B-TREE FOR ORDER BY
 }
diff --git a/test/transitive1.test b/test/transitive1.test
index 97dc5a71a9..9510920092 100644
--- a/test/transitive1.test
+++ b/test/transitive1.test
@@ -344,13 +344,13 @@ do_execsql_test transitive1-560 {
 do_execsql_test transitive1-560eqp {
   EXPLAIN QUERY PLAN
   SELECT * FROM c1 WHERE x=y AND y=z AND z='abc';
-} {/SCAN TABLE c1/}
+} {/SCAN c1/}
 do_execsql_test transitive1-570 {
   SELECT * FROM c1 WHERE x=y AND z=y AND z='abc';
 } {}
 do_execsql_test transitive1-570eqp {
   EXPLAIN QUERY PLAN
   SELECT * FROM c1 WHERE x=y AND z=y AND z='abc';
-} {/SEARCH TABLE c1 USING INDEX c1x/}
+} {/SEARCH c1 USING INDEX c1x/}
 
 finish_test
diff --git a/test/triggerupfrom.test b/test/triggerupfrom.test
index 9bfacb8430..a731045c4e 100644
--- a/test/triggerupfrom.test
+++ b/test/triggerupfrom.test
@@ -171,4 +171,3 @@ do_execsql_test 4.3 {
 
 
 finish_test
-
diff --git a/test/unordered.test b/test/unordered.test
index cdbbabeb3a..80595d95f7 100644
--- a/test/unordered.test
+++ b/test/unordered.test
@@ -40,27 +40,27 @@ foreach idxmode {ordered unordered} {
   sqlite3 db test.db
   foreach {tn sql r(ordered) r(unordered)} {
     1   "SELECT * FROM t1 ORDER BY a"
-        {SCAN TABLE t1 USING INDEX i1}
-        {SCAN TABLE t1*USE TEMP B-TREE FOR ORDER BY}
+        {SCAN t1 USING INDEX i1}
+        {SCAN t1*USE TEMP B-TREE FOR ORDER BY}
     2   "SELECT * FROM t1 WHERE a > 100"
-        {SEARCH TABLE t1 USING INDEX i1 (a>?)}
-        {SCAN TABLE t1}
+        {SEARCH t1 USING INDEX i1 (a>?)}
+        {SCAN t1}
     3   "SELECT * FROM t1 WHERE a = ? ORDER BY rowid"
-        {SEARCH TABLE t1 USING INDEX i1 (a=?)}
-        {SEARCH TABLE t1 USING INDEX i1 (a=?)*USE TEMP B-TREE FOR ORDER BY}
+        {SEARCH t1 USING INDEX i1 (a=?)}
+        {SEARCH t1 USING INDEX i1 (a=?)*USE TEMP B-TREE FOR ORDER BY}
     4   "SELECT max(a) FROM t1"
-        {SEARCH TABLE t1 USING COVERING INDEX i1}
-        {SEARCH TABLE t1}
+        {SEARCH t1 USING COVERING INDEX i1}
+        {SEARCH t1}
     5   "SELECT group_concat(b) FROM t1 GROUP BY a"
-        {SCAN TABLE t1 USING INDEX i1}
-        {SCAN TABLE t1*USE TEMP B-TREE FOR GROUP BY}
+        {SCAN t1 USING INDEX i1}
+        {SCAN t1*USE TEMP B-TREE FOR GROUP BY}
 
     6   "SELECT * FROM t1 WHERE a = ?"
-        {SEARCH TABLE t1 USING INDEX i1 (a=?)}
-        {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+        {SEARCH t1 USING INDEX i1 (a=?)}
+        {SEARCH t1 USING INDEX i1 (a=?)}
     7   "SELECT count(*) FROM t1"
-        {SCAN TABLE t1 USING COVERING INDEX i1}
-        {SCAN TABLE t1}
+        {SCAN t1 USING COVERING INDEX i1}
+        {SCAN t1}
   } {
     do_eqp_test 1.$idxmode.$tn $sql $r($idxmode)
   }
diff --git a/test/upfrom2.test b/test/upfrom2.test
index f903c1f4f7..81c847a604 100644
--- a/test/upfrom2.test
+++ b/test/upfrom2.test
@@ -367,5 +367,3 @@ foreach {tn update nm} {
 
 
 finish_test
-
-
diff --git a/test/upfrom3.test b/test/upfrom3.test
index d30b3fa28c..9936716b51 100644
--- a/test/upfrom3.test
+++ b/test/upfrom3.test
@@ -259,4 +259,3 @@ foreach {tn wo} {
 }
 
 finish_test
-
diff --git a/test/upfromfault.test b/test/upfromfault.test
index fcb5956089..e876c071cb 100644
--- a/test/upfromfault.test
+++ b/test/upfromfault.test
@@ -137,4 +137,3 @@ do_faultsim_test 2.3 -prep {
 
 
 finish_test
-
diff --git a/test/walsetlk.test b/test/walsetlk.test
index 66513ad2dc..8c0a9659f7 100644
--- a/test/walsetlk.test
+++ b/test/walsetlk.test
@@ -195,4 +195,3 @@ do_test 3.1 {
 } {1 {database is locked}}
 
 finish_test
-
diff --git a/test/where.test b/test/where.test
index fa3bcd836c..298248a6ea 100644
--- a/test/where.test
+++ b/test/where.test
@@ -70,10 +70,10 @@ do_test where-1.1.1b {
 } {3 121 10 3}
 do_eqp_test where-1.1.2 {
   SELECT x, y, w FROM t1 WHERE w=10
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_eqp_test where-1.1.2b {
   SELECT x, y, w FROM t1 WHERE w IS 10
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_test where-1.1.3 {
   db status step
 } {0}
@@ -85,13 +85,13 @@ do_test where-1.1.5 {
 } {99}
 do_eqp_test where-1.1.6 {
   SELECT x, y, w FROM t1 WHERE +w=10
-} {*SCAN TABLE t1*}
+} {*SCAN t1*}
 do_test where-1.1.7 {
   count {SELECT x, y, w AS abc FROM t1 WHERE abc=10}
 } {3 121 10 3}
 do_eqp_test where-1.1.8 {
   SELECT x, y, w AS abc FROM t1 WHERE abc=10
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_test where-1.1.9 {
   db status step
 } {0}
@@ -118,22 +118,22 @@ do_test where-1.4.1b {
 } {11 3 144 3}
 do_eqp_test where-1.4.2 {
   SELECT w, x, y FROM t1 WHERE 11=w AND x>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_eqp_test where-1.4.2b {
   SELECT w, x, y FROM t1 WHERE 11 IS w AND x>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_test where-1.4.3 {
   count {SELECT w AS a, x AS b, y FROM t1 WHERE 11=a AND b>2}
 } {11 3 144 3}
 do_eqp_test where-1.4.4 {
   SELECT w AS a, x AS b, y FROM t1 WHERE 11=a AND b>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_test where-1.5 {
   count {SELECT x, y FROM t1 WHERE y<200 AND w=11 AND x>2}
 } {3 144 3}
 do_eqp_test where-1.5.2 {
   SELECT x, y FROM t1 WHERE y<200 AND w=11 AND x>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
 do_test where-1.6 {
   count {SELECT x, y FROM t1 WHERE y<200 AND x>2 AND w=11}
 } {3 144 3}
@@ -145,10 +145,10 @@ do_test where-1.8 {
 } {3 144 3}
 do_eqp_test where-1.8.2 {
   SELECT x, y FROM t1 WHERE w>10 AND y=144 AND x=3
-} {*SEARCH TABLE t1 USING INDEX i1xy (x=? AND y=?)*}
+} {*SEARCH t1 USING INDEX i1xy (x=? AND y=?)*}
 do_eqp_test where-1.8.3 {
   SELECT x, y FROM t1 WHERE y=144 AND x=3
-} {*SEARCH TABLE t1 USING COVERING INDEX i1xy (x=? AND y=?)*}
+} {*SEARCH t1 USING COVERING INDEX i1xy (x=? AND y=?)*}
 do_test where-1.9 {
   count {SELECT x, y FROM t1 WHERE y=144 AND w>10 AND x=3}
 } {3 144 3}
diff --git a/test/where2.test b/test/where2.test
index 0a0533506a..7a7e9b92ed 100644
--- a/test/where2.test
+++ b/test/where2.test
@@ -76,10 +76,12 @@ proc queryplan {sql} {
   set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
   # puts eqp=$eqp
   foreach {a b c x} $eqp {
-    if {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
-        $x all as tab idx]} {
+    if {[regexp {SCAN CONSTANT} $x]} {
+      # noop
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+        $x all ss as tab idx]} {
       lappend data $tab $idx
-    } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
       lappend data $tab *
     }
   }
@@ -753,7 +755,7 @@ do_execsql_test where2-12.1 {
     SELECT a.x, b.x
       FROM t12 AS a JOIN t12 AS b ON a.y=b.x
      WHERE (b.x=$abc OR b.y=$abc);
-} {/.*SEARCH TABLE t12 AS b .*SEARCH TABLE t12 AS b .*/}
+} {/SEARCH b .*SEARCH b /}
 }
 
 # Verify that all necessary OP_OpenRead opcodes occur in the OR optimization.
diff --git a/test/where3.test b/test/where3.test
index 4d4ea3ee68..20af995cfe 100644
--- a/test/where3.test
+++ b/test/where3.test
@@ -111,10 +111,12 @@ proc queryplan {sql} {
   set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
   # puts eqp=$eqp
   foreach {a b c x} $eqp {
-    if {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
-        $x all as tab idx]} {
+    if {[regexp {SCAN CONSTANT} $x]} {
+      # noop
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+        $x all ss as tab idx]} {
       lappend data $tab $idx
-    } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+    } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
       lappend data $tab *
     }
   }
@@ -240,15 +242,15 @@ do_eqp_test where3-3.0a {
   SELECT * FROM t302, t301 WHERE t302.x=5 AND t301.a=t302.y;
 } {
   QUERY PLAN
-  |--SCAN TABLE t302
-  `--SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t302
+  `--SEARCH t301 USING INTEGER PRIMARY KEY (rowid=?)
 }
 do_eqp_test where3-3.1 {
   SELECT * FROM t301, t302 WHERE t302.x=5 AND t301.a=t302.y;
 } {
   QUERY PLAN
-  |--SCAN TABLE t302
-  `--SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SCAN t302
+  `--SEARCH t301 USING INTEGER PRIMARY KEY (rowid=?)
 }
 do_execsql_test where3-3.2 {
   SELECT * FROM t301 WHERE c=3 AND a IS NULL;
@@ -269,25 +271,25 @@ do_execsql_test where3-4.0 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t400, t401, t402 WHERE t402.z GLOB 'abc*';
 } {
-  0 0 2 {SCAN TABLE t402} 
-  0 1 0 {SCAN TABLE t400} 
-  0 2 1 {SCAN TABLE t401}
+  0 0 2 {SCAN t402} 
+  0 1 0 {SCAN t400} 
+  0 2 1 {SCAN t401}
 }
 do_execsql_test where3-4.1 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t400, t401, t402 WHERE t401.r GLOB 'abc*';
 } {
-  0 0 1 {SCAN TABLE t401} 
-  0 1 0 {SCAN TABLE t400} 
-  0 2 2 {SCAN TABLE t402}
+  0 0 1 {SCAN t401} 
+  0 1 0 {SCAN t400} 
+  0 2 2 {SCAN t402}
 }
 do_execsql_test where3-4.2 {
   EXPLAIN QUERY PLAN
   SELECT * FROM t400, t401, t402 WHERE t400.c GLOB 'abc*';
 } {
-  0 0 0 {SCAN TABLE t400} 
-  0 1 1 {SCAN TABLE t401} 
-  0 2 2 {SCAN TABLE t402}
+  0 0 0 {SCAN t400} 
+  0 1 1 {SCAN t401} 
+  0 2 2 {SCAN t402}
 }
 } ;# endif
 
@@ -321,8 +323,8 @@ do_eqp_test where3-5.0a {
     ORDER BY bbb.title COLLATE NOCASE ASC;
 } {
   QUERY PLAN
-  |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
-  |--SEARCH TABLE bbb USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+  |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test where3-5.1 {
@@ -334,8 +336,8 @@ do_eqp_test where3-5.1 {
     ORDER BY bbb.title COLLATE NOCASE ASC;
 } {
   QUERY PLAN
-  |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
-  |--SEARCH TABLE aaa AS bbb USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+  |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test where3-5.2 {
@@ -347,8 +349,8 @@ do_eqp_test where3-5.2 {
     ORDER BY bbb.title COLLATE NOCASE ASC;
 } {
   QUERY PLAN
-  |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
-  |--SEARCH TABLE bbb USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+  |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 do_eqp_test where3-5.3 {
@@ -360,8 +362,8 @@ do_eqp_test where3-5.3 {
     ORDER BY bbb.title COLLATE NOCASE ASC;
 } {
   QUERY PLAN
-  |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
-  |--SEARCH TABLE aaa AS bbb USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+  |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
diff --git a/test/where7.test b/test/where7.test
index 81111a9de4..830530634f 100644
--- a/test/where7.test
+++ b/test/where7.test
@@ -23354,10 +23354,10 @@ do_eqp_test where7-3.2 {
   QUERY PLAN
   |--MULTI-INDEX OR
   |  |--INDEX 1
-  |  |  `--SEARCH TABLE t301 USING COVERING INDEX t301_c4 (c4=?)
+  |  |  `--SEARCH t301 USING COVERING INDEX t301_c4 (c4=?)
   |  `--INDEX 2
-  |     `--SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)
-  |--SEARCH TABLE t302 USING INDEX t302_c8_c3 (c8=? AND c3>?)
+  |     `--SEARCH t301 USING INTEGER PRIMARY KEY (rowid=?)
+  |--SEARCH t302 USING INDEX t302_c8_c3 (c8=? AND c3>?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
diff --git a/test/where9.test b/test/where9.test
index 0f770dfee8..cb52b2b37d 100644
--- a/test/where9.test
+++ b/test/where9.test
@@ -362,12 +362,12 @@ ifcapable explain {
     WHERE t1.a=80 AND ((t1.c=t2.c AND t1.d=t2.d) OR t1.f=t2.f)
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+    |--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
     `--MULTI-INDEX OR
        |--INDEX 1
-       |  `--SEARCH TABLE t2 USING INDEX t2d (d=?)
+       |  `--SEARCH t2 USING INDEX t2d (d=?)
        `--INDEX 3
-          `--SEARCH TABLE t2 USING COVERING INDEX t2f (f=?)
+          `--SEARCH t2 USING COVERING INDEX t2f (f=?)
   }]
   do_eqp_test where9-3.2 {
     SELECT coalesce(t2.a,9999)
@@ -375,12 +375,12 @@ ifcapable explain {
     WHERE t1.a=80
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+    |--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
     `--MULTI-INDEX OR
        |--INDEX 1
-       |  `--SEARCH TABLE t2 USING INDEX t2d (d=?)
+       |  `--SEARCH t2 USING INDEX t2d (d=?)
        `--INDEX 2
-          `--SEARCH TABLE t2 USING COVERING INDEX t2f (f=?)
+          `--SEARCH t2 USING COVERING INDEX t2f (f=?)
   }]
 } 
 
@@ -461,23 +461,23 @@ do_eqp_test where9-5.1 {
   QUERY PLAN
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SEARCH TABLE t1 USING INDEX t1c (c=?)
+     |  `--SEARCH t1 USING INDEX t1c (c=?)
      `--INDEX 2
-        `--SEARCH TABLE t1 USING INDEX t1d (d=?)
+        `--SEARCH t1 USING INDEX t1d (d=?)
 }
 
 # In contrast, b=1000 is preferred over any OR-clause.
 #
 do_eqp_test where9-5.2 {
   SELECT a FROM t1 WHERE b=1000 AND (c=31031 OR d IS NULL)
-} {SEARCH TABLE t1 USING INDEX t1b (b=?)}
+} {SEARCH t1 USING INDEX t1b (b=?)}
 
 # Likewise, inequalities in an AND are preferred over inequalities in
 # an OR.
 #
 do_eqp_test where9-5.3 {
   SELECT a FROM t1 WHERE b>1000 AND (c>=31031 OR d IS NULL)
-} {SEARCH TABLE t1 USING INDEX t1b (b>?)}
+} {SEARCH t1 USING INDEX t1b (b>?)}
 
 ############################################################################
 # Make sure OR-clauses work correctly on UPDATE and DELETE statements.
diff --git a/test/whereE.test b/test/whereE.test
index a6b8f481b2..31086b2492 100644
--- a/test/whereE.test
+++ b/test/whereE.test
@@ -47,16 +47,16 @@ do_execsql_test 1.1 {
   CREATE UNIQUE INDEX t2zx ON t2(z,x);
 
   EXPLAIN QUERY PLAN SELECT x FROM t1, t2 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
 do_execsql_test 1.2 {
   EXPLAIN QUERY PLAN SELECT x FROM t2, t1 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
 do_execsql_test 1.3 {
   ANALYZE;
   EXPLAIN QUERY PLAN SELECT x FROM t1, t2 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
 do_execsql_test 1.4 {
   EXPLAIN QUERY PLAN SELECT x FROM t2, t1 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
 
 finish_test
diff --git a/test/whereF.test b/test/whereF.test
index 121cc3cf22..ac7fd807b8 100644
--- a/test/whereF.test
+++ b/test/whereF.test
@@ -63,7 +63,7 @@ foreach {tn sql} {
 } {
   do_test 1.$tn {
     db eval "EXPLAIN QUERY PLAN $sql"
-   } {/.*SCAN TABLE t2\y.*SEARCH TABLE t1\y.*/}
+   } {/.*SCAN t2\y.*SEARCH t1\y.*/}
 }
 
 do_execsql_test 2.0 {
@@ -84,7 +84,7 @@ foreach {tn sql} {
 } {
   do_test 2.$tn {
     db eval "EXPLAIN QUERY PLAN $sql"
-   } {/.*SCAN TABLE t2\y.*SEARCH TABLE t1\y.*/}
+   } {/.*SCAN t2\y.*SEARCH t1\y.*/}
 }
 
 do_execsql_test 3.0 {
@@ -109,7 +109,7 @@ foreach {tn sql} {
 } {
   do_test 3.$tn {
     db eval "EXPLAIN QUERY PLAN $sql"
-   } {/.*SCAN TABLE t2\y.*SEARCH TABLE t1\y.*/}
+   } {/.*SCAN t2\y.*SEARCH t1\y.*/}
 }
 
 do_execsql_test 4.0 {
diff --git a/test/whereG.test b/test/whereG.test
index abff2270b7..5096f06a9b 100644
--- a/test/whereG.test
+++ b/test/whereG.test
@@ -156,16 +156,16 @@ do_execsql_test whereG-3.0 {
 } {}
 do_eqp_test whereG-3.1 {
   SELECT * FROM a, b WHERE b1=a1 AND a2=5;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
 do_eqp_test whereG-3.2 {
   SELECT * FROM a, b WHERE a1=b1 AND a2=5;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
 do_eqp_test whereG-3.3 {
   SELECT * FROM a, b WHERE a2=5 AND b1=a1;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
 do_eqp_test whereG-3.4 {
   SELECT * FROM a, b WHERE a2=5 AND a1=b1;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
 
 # Ticket [1e64dd782a126f48d78c43a664844a41d0e6334e]:
 # Incorrect result in a nested GROUP BY/DISTINCT due to the use of an OP_SCopy
@@ -195,13 +195,13 @@ do_execsql_test 5.1 {
 }
 do_eqp_test 5.1.2 {
   SELECT * FROM t1 WHERE a>?
-} {SEARCH TABLE t1 USING INDEX i1 (a>?)}
+} {SEARCH t1 USING INDEX i1 (a>?)}
 do_eqp_test 5.1.3 {
   SELECT * FROM t1 WHERE likelihood(a>?, 0.9)
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test 5.1.4 {
   SELECT * FROM t1 WHERE likely(a>?)
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 do_test 5.2 {
   for {set i 0} {$i < 100} {incr i} {
@@ -212,29 +212,29 @@ do_test 5.2 {
 } {}
 do_eqp_test 5.2.2 {
   SELECT * FROM t1 WHERE likelihood(b>?, 0.01)
-} {SEARCH TABLE t1 USING INDEX i1 (ANY(a) AND b>?)}
+} {SEARCH t1 USING INDEX i1 (ANY(a) AND b>?)}
 do_eqp_test 5.2.3 {
   SELECT * FROM t1 WHERE likelihood(b>?, 0.9)
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test 5.2.4 {
   SELECT * FROM t1 WHERE likely(b>?)
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 ifcapable stat4 {
   do_eqp_test 5.3.1.stat4 {
     SELECT * FROM t1 WHERE a=?
-  } {SCAN TABLE t1}
+  } {SCAN t1}
 } else {
   do_eqp_test 5.3.1 {
     SELECT * FROM t1 WHERE a=?
-  } {SEARCH TABLE t1 USING INDEX i1}
+  } {SEARCH t1 USING INDEX i1}
 }
 do_eqp_test 5.3.2 {
   SELECT * FROM t1 WHERE likelihood(a=?, 0.9)
-} {SCAN TABLE t1}
+} {SCAN t1}
 do_eqp_test 5.3.3 {
   SELECT * FROM t1 WHERE likely(a=?)
-} {SCAN TABLE t1}
+} {SCAN t1}
 
 # 2015-06-18
 # Ticket [https://www.sqlite.org/see/tktview/472f0742a1868fb58862bc588ed70]
diff --git a/test/whereI.test b/test/whereI.test
index 7bb4ba39de..38e0148844 100644
--- a/test/whereI.test
+++ b/test/whereI.test
@@ -32,9 +32,9 @@ do_eqp_test 1.1 {
   QUERY PLAN
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SEARCH TABLE t1 USING INDEX i1 (b=?)
+     |  `--SEARCH t1 USING INDEX i1 (b=?)
      `--INDEX 2
-        `--SEARCH TABLE t1 USING INDEX i2 (c=?)
+        `--SEARCH t1 USING INDEX i2 (c=?)
 }
 
 do_execsql_test 1.2 {
@@ -64,9 +64,9 @@ do_eqp_test 2.1 {
   QUERY PLAN
   `--MULTI-INDEX OR
      |--INDEX 1
-     |  `--SEARCH TABLE t2 USING INDEX i3 (b=?)
+     |  `--SEARCH t2 USING INDEX i3 (b=?)
      `--INDEX 2
-        `--SEARCH TABLE t2 USING INDEX i4 (c=?)
+        `--SEARCH t2 USING INDEX i4 (c=?)
 }
 
 do_execsql_test 2.2 {
diff --git a/test/whereJ.test b/test/whereJ.test
index af6ffafb3f..c31ab8c370 100644
--- a/test/whereJ.test
+++ b/test/whereJ.test
@@ -402,7 +402,7 @@ do_eqp_test 3.4 {
     a = 4 AND b BETWEEN 20 AND 80           -- Matches 80 rows
       AND
     c BETWEEN 150 AND 160                   -- Matches 10 rows
-} {SEARCH TABLE t1 USING INDEX idx_c (c>? AND c<?)}
+} {SEARCH t1 USING INDEX idx_c (c>? AND c<?)}
 
 # This one should use index "idx_ab".
 do_eqp_test 3.5 {
@@ -410,7 +410,7 @@ do_eqp_test 3.5 {
     a = 5 AND b BETWEEN 20 AND 80           -- Matches 1 row
       AND
     c BETWEEN 150 AND 160                   -- Matches 10 rows
-} {SEARCH TABLE t1 USING INDEX idx_ab (a=? AND b>? AND b<?)}
+} {SEARCH t1 USING INDEX idx_ab (a=? AND b>? AND b<?)}
 
 ###########################################################################################
 
@@ -633,7 +633,7 @@ do_execsql_test 4.2 {
      AND px.cx_id = cx.cx_id
      AND px.px_tid = 0
      AND px.le_id = le.le_id;
-} {/.*SCAN TABLE cx.*SEARCH TABLE px.*SEARCH TABLE le.*/}
+} {/.*SCAN cx.*SEARCH px.*SEARCH le.*/}
 
 
 # The following test is derived from a performance problem reported from
diff --git a/test/whereK.test b/test/whereK.test
index 13c86508f9..060d470ff9 100644
--- a/test/whereK.test
+++ b/test/whereK.test
@@ -33,7 +33,7 @@ do_execsql_test 1.1 {
 do_execsql_test 1.1eqp {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE b>9 OR b=9 ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
 
 do_execsql_test 1.2 {
   SELECT a FROM t1 WHERE b>8 OR (b=8 AND c>7) ORDER BY +a;
@@ -41,7 +41,7 @@ do_execsql_test 1.2 {
 do_execsql_test 1.2eqp {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE b>8 OR (b=8 AND c>7) ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
 
 do_execsql_test 1.3 {
   SELECT a FROM t1 WHERE (b=8 AND c>7) OR b>8 ORDER BY +a;
@@ -49,7 +49,7 @@ do_execsql_test 1.3 {
 do_execsql_test 1.3eqp {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE (b=8 AND c>7) OR b>8 ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
 
 do_execsql_test 1.4 {
   SELECT a FROM t1 WHERE (b=8 AND c>7) OR 8<b ORDER BY +a;
@@ -57,7 +57,7 @@ do_execsql_test 1.4 {
 do_execsql_test 1.4eqp {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE (b=8 AND c>7) OR 8<b ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
 
 do_execsql_test 1.5 {
   SELECT a FROM t1 WHERE (b=8 AND c>7) OR (b>8 AND c NOT IN (4,5,6))
@@ -67,6 +67,6 @@ do_execsql_test 1.5eqp {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE (b=8 AND c>7) OR (b>8 AND c NOT IN (4,5,6))
    ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
 
 finish_test
diff --git a/test/whereL.test b/test/whereL.test
index c78ae160b3..5422ac5315 100644
--- a/test/whereL.test
+++ b/test/whereL.test
@@ -28,11 +28,11 @@ do_eqp_test 110 {
   QUERY PLAN
   `--COMPOUND QUERY
      |--LEFT-MOST SUBQUERY
-     |  |--SEARCH TABLE t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
-     |  `--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
+     |  |--SEARCH t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
+     |  `--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
      `--UNION ALL
-        |--SEARCH TABLE t3 USING INDEX sqlite_autoindex_t3_1 (a=?)
-        `--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
+        |--SEARCH t3 USING INDEX sqlite_autoindex_t3_1 (a=?)
+        `--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
 }
 
 # The scan of the t1 table goes first since that enables the ORDER BY
@@ -45,9 +45,9 @@ do_eqp_test 120 {
   ORDER BY t1.a;
 } {
   QUERY PLAN
-  |--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
-  |--SEARCH TABLE t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
-  `--SCAN TABLE t3
+  |--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
+  |--SEARCH t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
+  `--SCAN t3
 }
 
 # Constant propagation in the face of collating sequences:
diff --git a/test/windowpushd.test b/test/windowpushd.test
index 4462a0b4b4..f2e04d72fb 100644
--- a/test/windowpushd.test
+++ b/test/windowpushd.test
@@ -51,7 +51,7 @@ do_execsql_test 1.3 {
 
 do_eqp_test 1.4 {
   SELECT * FROM lll WHERE grp_id=2
-} {SEARCH TABLE t1 USING COVERING INDEX i1 (grp_id=?)}
+} {SEARCH t1 USING COVERING INDEX i1 (grp_id=?)}
 
 #-------------------------------------------------------------------------
 reset_db
@@ -158,10 +158,10 @@ foreach tn {0 1} {
   if {$tn==1} {
     do_eqp_test 2.$tn.3.3 {
       SELECT * FROM v3 WHERE b='E'
-    } {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+    } {SEARCH t1 USING INDEX i2 (b=?)}
     do_eqp_test 2.$tn.3.4 {
       SELECT * FROM v3 WHERE b>'C'
-    } {SEARCH TABLE t1 USING INDEX i2 (b>?)}
+    } {SEARCH t1 USING INDEX i2 (b>?)}
   }
 
   do_execsql_test 2.$tn.3.5 { SELECT * FROM v3 WHERE d<0.55; } { 
@@ -172,7 +172,7 @@ foreach tn {0 1} {
   if {$tn==1} {
     do_eqp_test 2.$tn.3.6 {
       SELECT * FROM v3 WHERE d<0.55
-    } {SCAN TABLE t1 USING INDEX i2}
+    } {SCAN t1 USING INDEX i2}
   }
 
   do_execsql_test 2.$tn.4.1 {
@@ -234,4 +234,3 @@ foreach tn {0 1} {
 
 
 finish_test
-
diff --git a/test/with1.test b/test/with1.test
index 74997c1db0..08ef8919ad 100644
--- a/test/with1.test
+++ b/test/with1.test
@@ -1025,10 +1025,10 @@ do_eqp_test 19.1b {
   SELECT * FROM t1;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE x1
   |  `--SCAN CONSTANT ROW
-  |--SCAN SUBQUERY xxxxxx
-  `--SCAN SUBQUERY xxxxxx
+  |--SCAN x1
+  `--SCAN x1
 }
 
 # 2017-10-28.
diff --git a/test/with3.test b/test/with3.test
index 6dffb84077..67f286e2bc 100644
--- a/test/with3.test
+++ b/test/with3.test
@@ -89,13 +89,13 @@ ifcapable analyze {
     SELECT * FROM cnt, y1 WHERE i=a
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--MATERIALIZE xxxxxx
+    |--MATERIALIZE cnt
     |  |--SETUP
     |  |  `--SCAN CONSTANT ROW
     |  `--RECURSIVE STEP
-    |     `--SCAN TABLE cnt
-    |--SCAN SUBQUERY xxxxxx
-    `--SEARCH TABLE y1 USING INDEX y1a (a=?)
+    |     `--SCAN cnt
+    |--SCAN cnt
+    `--SEARCH y1 USING INDEX y1a (a=?)
   }]
 
   do_eqp_test 3.1.3 {
@@ -103,13 +103,13 @@ ifcapable analyze {
     SELECT * FROM cnt, y1 WHERE i=a
   } [string map {"\n  " \n} {
     QUERY PLAN
-    |--MATERIALIZE xxxxxx
+    |--MATERIALIZE cnt
     |  |--SETUP
     |  |  `--SCAN CONSTANT ROW
     |  `--RECURSIVE STEP
-    |     `--SCAN TABLE cnt
-    |--SCAN TABLE y1
-    `--SEARCH SUBQUERY xxxxxx USING AUTOMATIC COVERING INDEX (i=?)
+    |     `--SCAN cnt
+    |--SCAN y1
+    `--SEARCH cnt USING AUTOMATIC COVERING INDEX (i=?)
   }]
 }
 
@@ -125,17 +125,17 @@ do_eqp_test 3.2.2 {
      WHERE c.id=w2.pk AND c.id=w1.pk;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c
   |  |--SETUP
   |  |  |--SCAN CONSTANT ROW
   |  |  `--SCALAR SUBQUERY xxxxxx
-  |  |     `--SCAN TABLE w2
+  |  |     `--SCAN w2
   |  `--RECURSIVE STEP
-  |     |--SCAN TABLE w1
-  |     `--SCAN TABLE c
-  |--SCAN SUBQUERY xxxxxx
-  |--SEARCH TABLE w2 USING INTEGER PRIMARY KEY (rowid=?)
-  `--SEARCH TABLE w1 USING INTEGER PRIMARY KEY (rowid=?)
+  |     |--SCAN w1
+  |     `--SCAN c
+  |--SCAN c
+  |--SEARCH w2 USING INTEGER PRIMARY KEY (rowid=?)
+  `--SEARCH w1 USING INTEGER PRIMARY KEY (rowid=?)
 }
 
 do_execsql_test 4.0 {
@@ -207,15 +207,15 @@ do_eqp_test 5.1 {
   ORDER BY 1;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE x1
   |  |--SETUP
   |  |  `--SCAN CONSTANT ROW
   |  `--RECURSIVE STEP
-  |     `--SCAN TABLE c
-  |--SCAN SUBQUERY xxxxxx AS x1
-  |--SCAN SUBQUERY xxxxxx AS x2
-  |--SCAN SUBQUERY xxxxxx AS x3
-  |--SCAN SUBQUERY xxxxxx AS x4
+  |     `--SCAN c
+  |--SCAN x1
+  |--SCAN x2
+  |--SCAN x3
+  |--SCAN x4
   `--USE TEMP B-TREE FOR ORDER BY
 }
 do_execsql_test 5.2 {
diff --git a/test/with6.test b/test/with6.test
index ef63ec8bee..8a04fe1e3b 100644
--- a/test/with6.test
+++ b/test/with6.test
@@ -30,11 +30,11 @@ do_eqp_test 101 {
   SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c1
   |  `--SCAN 2 CONSTANT ROWS
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  `--SCAN SUBQUERY xxxxxx AS c3
+  |--SCAN c1
+  |--SCAN c2
+  `--SCAN c3
 }
 
 do_execsql_test 110 {
@@ -46,11 +46,11 @@ do_eqp_test 111 {
   SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c1
   |  `--SCAN 2 CONSTANT ROWS
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  `--SCAN SUBQUERY xxxxxx AS c3
+  |--SCAN c1
+  |--SCAN c2
+  `--SCAN c3
 }
 
 # Even though the CTE is not materialized, the self-join optimization
@@ -65,11 +65,11 @@ do_eqp_test 121 {
   SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c1
   |  `--SCAN 2 CONSTANT ROWS
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  `--SCAN SUBQUERY xxxxxx AS c3
+  |--SCAN c1
+  |--SCAN c2
+  `--SCAN c3
 }
 
 do_execsql_test 130 {
@@ -87,21 +87,21 @@ do_eqp_test 131 {
          (SELECT x FROM c LIMIT 5) AS c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--CO-ROUTINE xxxxxx
+  |--MATERIALIZE c1
+  |  |--CO-ROUTINE c
   |  |  `--SCAN 2 CONSTANT ROWS
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  |--CO-ROUTINE xxxxxx
+  |  `--SCAN c
+  |--MATERIALIZE c2
+  |  |--CO-ROUTINE c
   |  |  `--SCAN 2 CONSTANT ROWS
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  |--CO-ROUTINE xxxxxx
+  |  `--SCAN c
+  |--MATERIALIZE c3
+  |  |--CO-ROUTINE c
   |  |  `--SCAN 2 CONSTANT ROWS
-  |  `--SCAN SUBQUERY xxxxxx
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  `--SCAN SUBQUERY xxxxxx AS c3
+  |  `--SCAN c
+  |--SCAN c1
+  |--SCAN c2
+  `--SCAN c3
 }
 
 # The (SELECT x FROM c LIMIT N) subqueries get materialized once each.
@@ -123,17 +123,17 @@ do_eqp_test 141 {
          (SELECT x FROM c LIMIT 7) AS c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c1
+  |  |--MATERIALIZE c
   |  |  `--SCAN 2 CONSTANT ROWS
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN SUBQUERY xxxxxx
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  `--SCAN SUBQUERY xxxxxx AS c3
+  |  `--SCAN c
+  |--MATERIALIZE c2
+  |  `--SCAN c
+  |--MATERIALIZE c3
+  |  `--SCAN c
+  |--SCAN c1
+  |--SCAN c2
+  `--SCAN c3
 }
 
 do_execsql_test 150 {
@@ -151,17 +151,17 @@ do_eqp_test 151 {
          (SELECT x FROM c LIMIT 7) AS c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c1
+  |  |--MATERIALIZE c
   |  |  `--SCAN 2 CONSTANT ROWS
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN SUBQUERY xxxxxx
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  `--SCAN SUBQUERY xxxxxx AS c3
+  |  `--SCAN c
+  |--MATERIALIZE c2
+  |  `--SCAN c
+  |--MATERIALIZE c3
+  |  `--SCAN c
+  |--SCAN c1
+  |--SCAN c2
+  `--SCAN c3
 }
 
 do_execsql_test 160 {
@@ -175,11 +175,11 @@ do_eqp_test 161 {
     FROM c AS c2 WHERE c2.x<10;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c2
   |  `--SCAN 2 CONSTANT ROWS
-  |--SCAN SUBQUERY xxxxxx AS c2
+  |--SCAN c2
   `--CORRELATED SCALAR SUBQUERY xxxxxx
-     `--SCAN SUBQUERY xxxxxx
+     `--SCAN c
 }
 
 do_execsql_test 170 {
@@ -193,13 +193,13 @@ do_eqp_test 171 {
     FROM c AS c2 WHERE c2.x<10;
 } {
   QUERY PLAN
-  |--CO-ROUTINE xxxxxx
+  |--CO-ROUTINE c2
   |  `--SCAN 2 CONSTANT ROWS
-  |--SCAN SUBQUERY xxxxxx AS c2
+  |--SCAN c2
   `--CORRELATED SCALAR SUBQUERY xxxxxx
-     |--CO-ROUTINE xxxxxx
+     |--CO-ROUTINE c
      |  `--SCAN 2 CONSTANT ROWS
-     `--SCAN SUBQUERY xxxxxx
+     `--SCAN c
 }
 
 
@@ -228,15 +228,15 @@ do_eqp_test 211 {
   SELECT y FROM t2 ORDER BY y;
 } {
   QUERY PLAN
-  |--MATERIALIZE xxxxxx
-  |  |--MATERIALIZE xxxxxx
+  |--MATERIALIZE c1
+  |  |--MATERIALIZE c
   |  |  `--SCAN 3 CONSTANT ROWS
-  |  `--SCAN SUBQUERY xxxxxx
-  |--MATERIALIZE xxxxxx
-  |  `--SCAN SUBQUERY xxxxxx
-  |--SCAN SUBQUERY xxxxxx AS c1
-  |--SCAN SUBQUERY xxxxxx AS c2
-  |--SCAN TABLE t1
+  |  `--SCAN c
+  |--MATERIALIZE c2
+  |  `--SCAN c
+  |--SCAN c1
+  |--SCAN c2
+  |--SCAN t1
   `--USE TEMP B-TREE FOR ORDER BY
 }
 do_execsql_test 220 {
diff --git a/test/without_rowid6.test b/test/without_rowid6.test
index 567acfaed6..06fc7435b0 100644
--- a/test/without_rowid6.test
+++ b/test/without_rowid6.test
@@ -64,7 +64,7 @@ do_execsql_test_if_vtab without_rowid6-201 {
 do_execsql_test without_rowid6-210 {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
 do_execsql_test without_rowid6-220 {
   PRAGMA index_list(t1);
 } {/sqlite_autoindex_t1_2 1 pk/}
@@ -83,7 +83,7 @@ do_execsql_test without_rowid6-300 {
 do_execsql_test without_rowid6-310 {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
 do_execsql_test without_rowid6-320 {
   PRAGMA index_list(t1);
 } {/sqlite_autoindex_t1_2 1 pk/}
@@ -101,7 +101,7 @@ do_execsql_test without_rowid6-400 {
 do_execsql_test without_rowid6-410 {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
 do_execsql_test without_rowid6-420 {
   PRAGMA index_list(t1);
 } {/sqlite_autoindex_t1_2 1 pk/}
@@ -121,7 +121,7 @@ do_execsql_test_if_vtab without_rowid6-501 {
 do_execsql_test without_rowid6-510 {
   EXPLAIN QUERY PLAN
   SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
 do_execsql_test without_rowid6-520 {
   PRAGMA index_list(t1);
 } {/sqlite_autoindex_t1_1 1 pk/}

From 2f2091b10e28fc76a9c30e084a4eb2c466a75674 Mon Sep 17 00:00:00 2001
From: drh <>
Date: Sat, 20 Mar 2021 15:46:01 +0000
Subject: [PATCH 4/4] Use the canonical name, not the AS name, when showing the
 MATERIALIZE or CO-ROUTINE lines for a CTE.

FossilOrigin-Name: 1b83e232c490fe6e9f999d30399faebfac6094bf940dc21dc459ed2c97657cb2
---
 manifest        | 18 +++++++++---------
 manifest.uuid   |  2 +-
 src/printf.c    |  6 ++++--
 src/wherecode.c |  2 +-
 test/with3.test |  2 +-
 test/with6.test | 10 +++++-----
 6 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/manifest b/manifest
index 6b7d4686f3..f6c9a71b69 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Revise\stests\scases\sto\salign\swith\sthe\snew\sEXPLAIN\sQUERY\sPLAN\soutput.
-D 2021-03-20T15:11:29.894
+C Use\sthe\scanonical\sname,\snot\sthe\sAS\sname,\swhen\sshowing\sthe\sMATERIALIZE\sor\nCO-ROUTINE\slines\sfor\sa\sCTE.
+D 2021-03-20T15:46:01.337
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -538,7 +538,7 @@ F src/pcache1.c 388304fd2d91c39591080b5e0f3c62cfba87db20370e7e0554062bfb29740e9f
 F src/pragma.c eb42cb9bec189cf18cef5d8fcae56e13bb73ef2b019b198fb48740ced81bce95
 F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
 F src/prepare.c e21b54489b5c73b06ada15e6fc79b5c6f64b06701924a6ca98944ae59e06256f
-F src/printf.c 987fdc0ea410ef5eae634a538403faf89c7e6ec9b5b70457d5148605aa9f1241
+F src/printf.c 85d3413fa526404f053a2a13150492f94900639fca4c1b2f74a312b5d777a5c3
 F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
 F src/resolve.c dd47248c2c914feb0d4428c27d782e2723971d32cfa5536f49306d080df4d45a
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
@@ -631,7 +631,7 @@ F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
 F src/walker.c d42d6c80ea363ef689a462e65eefcfe87deab924c50de5baa37ecb6af7d7ddaa
 F src/where.c 10d06b16670a1d2a992d52a9f08e49426d38a08fb0a7ae5f7f62fd023d560e1e
 F src/whereInt.h 446e5e8018f83358ef917cf32d8e6a86dc8430113d0b17e720f1839d3faa44c4
-F src/wherecode.c 40a5d24cd042fea137ec821725c57c3586d8b92a08da8a47e870c0695bff0817
+F src/wherecode.c c7354c9749f015f37bc32e15a4257a5155fa5d2b79f605f528bd09f3b9f1b4e6
 F src/whereexpr.c 53452fe2fb07be2f4cb17f55cc721416fae0092c00717f106faf289c990b6494
 F src/window.c 7e89ac4b6cd6bb9b7772234a625d19c39b530f4ac06e43688a8b7e6a1ab512a2
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
@@ -1789,10 +1789,10 @@ F test/windowfault.test d543d46571b32d19f198cb04b6505747fabf3cc369970daae47074ee
 F test/windowpushd.test d8895d08870b7226f7693665bd292eb177e62ca06799184957b3ca7dc03067df
 F test/with1.test b231edbf0f7c1d94bc14365cd9f33e197b2f0aa16add927ee121649fce014c15
 F test/with2.test 000fb95f1f29dae868cea0f41505eb5126077d49eb967ff88f9ee46212ad8863
-F test/with3.test e223b72a349a1f36561757d6bd918ec966ed200147f8d8293771487267ee4983
+F test/with3.test ad32d13ad50661e6fa305f62a0717649c348792e7b658bf2644976227a9e0373
 F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
 F test/with5.test 6248213c41fab36290b5b73aa3f937309dfba337004d9d8434c3fabc8c7d4be8
-F test/with6.test 3ac280f6ceb8ce493dca2b36a4038f486710445fb62f6bfbba43d04c991f63cf
+F test/with6.test 661d7e416bef6c0a2556b2c9f0c8178a5b15932bed65246abed99723a8d4e7c0
 F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
 F test/without_rowid1.test e4034c0849ccc2e8bb749c69f15bd69bb9fcf8fe77e8d17ce02369604242fe83
 F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
@@ -1910,7 +1910,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 1fadd30525dbf22678ba014b78af3a0fb33047692f073b7c62a90a028081ac48
-R 7666c425ea77f28b35eec29e0104fd77
+P 50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
+R 8aabd5e1a73e25702742b13fe62bc444
 U drh
-Z c0db795a2f90d970c03a8b0a7ba43e6f
+Z 0b6f36b63a67910ac9a53d6251caaa0a
diff --git a/manifest.uuid b/manifest.uuid
index 3d885a72ae..f6f7c2d78a 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
\ No newline at end of file
+1b83e232c490fe6e9f999d30399faebfac6094bf940dc21dc459ed2c97657cb2
\ No newline at end of file
diff --git a/src/printf.c b/src/printf.c
index 48382143b1..6f3b5681ac 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -102,7 +102,7 @@ static const et_info fmtinfo[] = {
 /* Notes:
 **
 **    %S    Takes a pointer to SrcItem.  Shows name or database.name
-**    %!S   Like %S but also shows AS alias if an alias is available
+**    %!S   Like %S but prefer the zName over the zAlias
 */
 
 /* Floating point constants used for rounding */
@@ -864,7 +864,7 @@ void sqlite3_str_vappendf(
         if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
         pItem = va_arg(ap, SrcItem*);
         assert( bArgList==0 );
-        if( pItem->zAlias ){
+        if( pItem->zAlias && !flag_altform2 ){
           sqlite3_str_appendall(pAccum, pItem->zAlias);
         }else if( pItem->zName ){
           if( pItem->zDatabase ){
@@ -872,6 +872,8 @@ void sqlite3_str_vappendf(
             sqlite3_str_append(pAccum, ".", 1);
           }
           sqlite3_str_appendall(pAccum, pItem->zName);
+        }else if( pItem->zAlias ){
+          sqlite3_str_appendall(pAccum, pItem->zAlias);
         }else if( pItem->pSelect ){
           sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
         }
diff --git a/src/wherecode.c b/src/wherecode.c
index 195c08de3e..771a50fc7b 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -149,7 +149,7 @@ int sqlite3WhereExplainOneScan(
 
     sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
     str.printfFlags = SQLITE_PRINTF_INTERNAL;
-    sqlite3_str_appendf(&str, "%s %!S", isSearch ? "SEARCH" : "SCAN", pItem);
+    sqlite3_str_appendf(&str, "%s %S", isSearch ? "SEARCH" : "SCAN", pItem);
     if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
       const char *zFmt = 0;
       Index *pIdx;
diff --git a/test/with3.test b/test/with3.test
index 67f286e2bc..8e8eba89f6 100644
--- a/test/with3.test
+++ b/test/with3.test
@@ -207,7 +207,7 @@ do_eqp_test 5.1 {
   ORDER BY 1;
 } {
   QUERY PLAN
-  |--MATERIALIZE x1
+  |--MATERIALIZE c
   |  |--SETUP
   |  |  `--SCAN CONSTANT ROW
   |  `--RECURSIVE STEP
diff --git a/test/with6.test b/test/with6.test
index 8a04fe1e3b..333147d8be 100644
--- a/test/with6.test
+++ b/test/with6.test
@@ -30,7 +30,7 @@ do_eqp_test 101 {
   SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE c1
+  |--MATERIALIZE c
   |  `--SCAN 2 CONSTANT ROWS
   |--SCAN c1
   |--SCAN c2
@@ -46,7 +46,7 @@ do_eqp_test 111 {
   SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE c1
+  |--MATERIALIZE c
   |  `--SCAN 2 CONSTANT ROWS
   |--SCAN c1
   |--SCAN c2
@@ -65,7 +65,7 @@ do_eqp_test 121 {
   SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
 } {
   QUERY PLAN
-  |--MATERIALIZE c1
+  |--MATERIALIZE c
   |  `--SCAN 2 CONSTANT ROWS
   |--SCAN c1
   |--SCAN c2
@@ -175,7 +175,7 @@ do_eqp_test 161 {
     FROM c AS c2 WHERE c2.x<10;
 } {
   QUERY PLAN
-  |--MATERIALIZE c2
+  |--MATERIALIZE c
   |  `--SCAN 2 CONSTANT ROWS
   |--SCAN c2
   `--CORRELATED SCALAR SUBQUERY xxxxxx
@@ -193,7 +193,7 @@ do_eqp_test 171 {
     FROM c AS c2 WHERE c2.x<10;
 } {
   QUERY PLAN
-  |--CO-ROUTINE c2
+  |--CO-ROUTINE c
   |  `--SCAN 2 CONSTANT ROWS
   |--SCAN c2
   `--CORRELATED SCALAR SUBQUERY xxxxxx