-C Improved\s"wheretrace"\scapabilities:\s\sShow\sthe\sconstraint\sexpression\sif\sthe\nwheretrace\sflag\shas\sthe\s0x100\sbit\sset\sand\sif\scompiled\swith\nSQLITE_ENABLE_TREE_EXPLAIN.
-D 2013-10-28T14:34:35.937
+C Bug\sfix\sand\senhancements\sto\sthe\simproved\swheretrace\slogic\sthat\sshows\sthe\nconstraint\sexpressions.
+D 2013-10-28T19:03:21.821
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 0522b53cdc1fcfc18f3a98e0246add129136c654
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c e9e593d5bb798c3e67fc3893dfe7055c9e7d8d74
-F src/where.c 8eaf13f3047d80841f6f1a38f4dfaf4409528a4b
+F src/where.c 65ff0a3241feaebda8c2996f1d56e13e13bfad11
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 21eccb919441bd111ba414dde3f00862822e2c99
-R 5260b5cc40060f48c72b8d61c27b1dc0
+P 710a18ac7916cb688955505d7d461b461f563155
+R 89498d16fc02d0b55681c504013a5543
U drh
-Z d9787b9cfeec57eaa314263c770f7600
+Z a3f286e08ab862275ce77a1e64b61897
/*
** Print a WhereLoop object for debugging purposes
*/
-static void whereLoopPrint(WhereLoop *p, WhereInfo *pWInfo){
+static void whereLoopPrint(WhereLoop *p, WhereClause *pWC){
+ WhereInfo *pWInfo = pWC->pWInfo;
int nb = 1+(pWInfo->pTabList->nSrc+7)/8;
struct SrcList_item *pItem = pWInfo->pTabList->a + p->iTab;
Table *pTab = pItem->pTab;
sqlite3DebugPrintf(" %12s",
pItem->zAlias ? pItem->zAlias : pTab->zName);
if( (p->wsFlags & WHERE_VIRTUALTABLE)==0 ){
- if( p->u.btree.pIndex ){
- const char *zName = p->u.btree.pIndex->zName;
- if( zName==0 ) zName = "ipk";
+ const char *zName;
+ if( p->u.btree.pIndex && (zName = p->u.btree.pIndex->zName)!=0 ){
if( strncmp(zName, "sqlite_autoindex_", 17)==0 ){
int i = sqlite3Strlen30(zName) - 1;
while( zName[i]!='_' ) i--;
Vdbe *v = pWInfo->pParse->pVdbe;
sqlite3ExplainBegin(v);
for(i=0; i<p->nLTerm; i++){
- sqlite3ExplainPrintf(v, " (%d) ", i+1);
+ WhereTerm *pTerm = p->aLTerm[i];
+ sqlite3ExplainPrintf(v, " (%d) #%d ", i+1, (int)(pTerm-pWC->a));
+ if( (pTerm->wtFlags & (TERM_ORINFO|TERM_ANDINFO))==0 ){
+ sqlite3ExplainPrintf(v, "lhs=%-2d ", pTerm->u.leftColumn);
+ }
sqlite3ExplainPush(v);
- sqlite3ExplainExpr(v, p->aLTerm[i]->pExpr);
+ sqlite3ExplainExpr(v, pTerm->pExpr);
sqlite3ExplainPop(v);
sqlite3ExplainNL(v);
}
- sqlite3DebugPrintf("%s", sqlite3VdbeExplanation(v));
sqlite3ExplainFinish(v);
+ sqlite3DebugPrintf("%s", sqlite3VdbeExplanation(v));
}
#endif
}
#if WHERETRACE_ENABLED /* 0x8 */
if( sqlite3WhereTrace & 0x8 ){
sqlite3DebugPrintf(x?" or-%d: ":" or-X: ", n);
- whereLoopPrint(pTemplate, pWInfo);
+ whereLoopPrint(pTemplate, pBuilder->pWC);
}
#endif
return SQLITE_OK;
if( sqlite3WhereTrace & 0x8 ){
if( p!=0 ){
sqlite3DebugPrintf("ins-del: ");
- whereLoopPrint(p, pWInfo);
+ whereLoopPrint(p, pBuilder->pWC);
}
sqlite3DebugPrintf("ins-new: ");
- whereLoopPrint(pTemplate, pWInfo);
+ whereLoopPrint(pTemplate, pBuilder->pWC);
}
#endif
if( p==0 ){
#if WHERETRACE_ENABLED /* 0x8 */
if( sqlite3WhereTrace & 0x8 ){
sqlite3DebugPrintf("ins-noop: ");
- whereLoopPrint(pTemplate, pWInfo);
+ whereLoopPrint(pTemplate, pBuilder->pWC);
}
#endif
return SQLITE_OK;
"ABCDEFGHIJKLMNOPQRSTUVWYXZ";
for(p=pWInfo->pLoops, i=0; p; p=p->pNextLoop, i++){
p->cId = zLabel[i%sizeof(zLabel)];
- whereLoopPrint(p, pWInfo);
+ whereLoopPrint(p, sWLB.pWC);
}
}
#endif
}
sqlite3DebugPrintf("\n");
for(ii=0; ii<pWInfo->nLevel; ii++){
- whereLoopPrint(pWInfo->a[ii].pWLoop, pWInfo);
+ whereLoopPrint(pWInfo->a[ii].pWLoop, sWLB.pWC);
}
}
#endif