1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Minor enhancements to the auxiliary information added to EXPLAIN output with

SQLITE_EXPLAIN_ENABLE_COMMENTS.

FossilOrigin-Name: 0d1328e33ca761eddcf8a50e8e83c997861e9047
This commit is contained in:
drh
2013-11-12 20:18:14 +00:00
parent e54df42d87
commit 5e6790cb15
5 changed files with 16 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
C Break\sout\sthe\sstructure\sand\smacro\sdefinitions\sof\swhere.c\sinto\sa\sseparate\nheader\sfile\swhereInt.h\sfor\seasier\sediting\sand\sdebugging. C Minor\senhancements\sto\sthe\sauxiliary\sinformation\sadded\sto\sEXPLAIN\soutput\swith\nSQLITE_EXPLAIN_ENABLE_COMMENTS.
D 2013-11-12T18:37:25.924 D 2013-11-12T20:18:14.367
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1 F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -284,7 +284,7 @@ F src/vdbe.c fda0d2ba5a3a5ab588f0467782e7fd64930ddb22
F src/vdbe.h 8d5a7351024d80374fc0acdbbe3cfe65c51ba8b6 F src/vdbe.h 8d5a7351024d80374fc0acdbbe3cfe65c51ba8b6
F src/vdbeInt.h f2fa3ceccceeb757773921fb08af7c6e9f3caa1c F src/vdbeInt.h f2fa3ceccceeb757773921fb08af7c6e9f3caa1c
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
F src/vdbeaux.c 84d2d421c11c3e534d4948274e4d0a5d5816a695 F src/vdbeaux.c 75c5fee307004739d814a840699df5e853e02b79
F src/vdbeblob.c ff60adf2953e0ffc1d59541b3101c9886b03a3de F src/vdbeblob.c ff60adf2953e0ffc1d59541b3101c9886b03a3de
F src/vdbemem.c cc529bbf4f13e4e181bdb446bf6e6962ab030b4b F src/vdbemem.c cc529bbf4f13e4e181bdb446bf6e6962ab030b4b
F src/vdbesort.c 9d83601f9d6243fe70dd0169a2820c5ddfd48147 F src/vdbesort.c 9d83601f9d6243fe70dd0169a2820c5ddfd48147
@@ -293,8 +293,8 @@ F src/vtab.c 5a423b042eb1402ef77697d03d6a67378d97bc8d
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4 F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c e9e593d5bb798c3e67fc3893dfe7055c9e7d8d74 F src/walker.c e9e593d5bb798c3e67fc3893dfe7055c9e7d8d74
F src/where.c 7ce9564fc41539a45fd9c416ea4282b3defc1311 F src/where.c 48404454d772af51f9075a33b485bd2270f31dd3
F src/whereInt.h fda11df00f43f9d4a16cc215c0675c83ba362efd F src/whereInt.h 63c8345d01d12ded6250b72e7c16855f0a358041
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6 F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
@@ -1138,7 +1138,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
P aa7ba302ed13aedde89b5bcbe9119799c0da8a42 P c44467124623733aac64096d605f16139b733a7f
R b1d0892fd01796ef0307192d25431345 R 6e0586ae35f6a5b0a0e54c1d5a933029
U drh U drh
Z e9ed81f2d95ba49c17059d8287cc88cd Z b01fa55693742bbd2cb099540a606861

View File

@@ -1 +1 @@
c44467124623733aac64096d605f16139b733a7f 0d1328e33ca761eddcf8a50e8e83c997861e9047

View File

@@ -982,7 +982,7 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
} }
case P4_COLLSEQ: { case P4_COLLSEQ: {
CollSeq *pColl = pOp->p4.pColl; CollSeq *pColl = pOp->p4.pColl;
sqlite3_snprintf(nTemp, zTemp, "collseq(%.20s)", pColl->zName); sqlite3_snprintf(nTemp, zTemp, "(%.20s)", pColl->zName);
break; break;
} }
case P4_FUNCDEF: { case P4_FUNCDEF: {

View File

@@ -2725,7 +2725,7 @@ static Bitmask codeOneLoopStart(
bRev = (pWInfo->revMask>>iLevel)&1; bRev = (pWInfo->revMask>>iLevel)&1;
omitTable = (pLoop->wsFlags & WHERE_IDX_ONLY)!=0 omitTable = (pLoop->wsFlags & WHERE_IDX_ONLY)!=0
&& (pWInfo->wctrlFlags & WHERE_FORCE_TABLE)==0; && (pWInfo->wctrlFlags & WHERE_FORCE_TABLE)==0;
VdbeNoopComment((v, "Begin WHERE-Loop %d: %s", iLevel,pTabItem->pTab->zName)); VdbeNoopComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName));
/* Create labels for the "break" and "continue" instructions /* Create labels for the "break" and "continue" instructions
** for the current loop. Jump to addrBrk to break out of a loop. ** for the current loop. Jump to addrBrk to break out of a loop.
@@ -5679,6 +5679,7 @@ WhereInfo *sqlite3WhereBegin(
} }
/* Done. */ /* Done. */
VdbeNoopComment((v, "Begin WHERE-core"));
return pWInfo; return pWInfo;
/* Jump here if malloc fails */ /* Jump here if malloc fails */
@@ -5705,6 +5706,7 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
/* Generate loop termination code. /* Generate loop termination code.
*/ */
VdbeNoopComment((v, "End WHERE-core"));
sqlite3ExprCacheClear(pParse); sqlite3ExprCacheClear(pParse);
for(i=pWInfo->nLevel-1; i>=0; i--){ for(i=pWInfo->nLevel-1; i>=0; i--){
pLevel = &pWInfo->a[i]; pLevel = &pWInfo->a[i];
@@ -5744,7 +5746,7 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
} }
sqlite3VdbeJumpHere(v, addr); sqlite3VdbeJumpHere(v, addr);
} }
VdbeNoopComment((v, "End WHERE-Loop %d: %s", i, VdbeNoopComment((v, "End WHERE-loop%d: %s", i,
pWInfo->pTabList->a[pLevel->iFrom].pTab->zName)); pWInfo->pTabList->a[pLevel->iFrom].pTab->zName));
} }

View File

@@ -113,7 +113,8 @@ struct WhereLoop {
LogEst nOut; /* Estimated number of output rows */ LogEst nOut; /* Estimated number of output rows */
union { union {
struct { /* Information for internal btree tables */ struct { /* Information for internal btree tables */
int nEq; /* Number of equality constraints */ u16 nEq; /* Number of equality constraints */
u16 nSkip; /* Number of initial index columns to skip */
Index *pIndex; /* Index used, or NULL */ Index *pIndex; /* Index used, or NULL */
} btree; } btree;
struct { /* Information for virtual tables */ struct { /* Information for virtual tables */