aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/where.c b/src/where.c
index 40f95acc4..9ece59f93 100644
--- a/src/where.c
+++ b/src/where.c
@@ -365,11 +365,6 @@ static int allowedOp(int op){
}
/*
-** Swap two objects of type TYPE.
-*/
-#define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}
-
-/*
** Commute a comparison operator. Expressions of the form "X op Y"
** are converted into "Y op X".
**
@@ -3761,22 +3756,6 @@ static Bitmask codeOneLoopStart(
return pLevel->notReady;
}
-#if defined(WHERETRACE_ENABLED) && defined(SQLITE_ENABLE_TREE_EXPLAIN)
-/*
-** Generate "Explanation" text for a WhereTerm.
-*/
-static void whereExplainTerm(Vdbe *v, WhereTerm *pTerm){
- char zType[4];
- memcpy(zType, "...", 4);
- if( pTerm->wtFlags & TERM_VIRTUAL ) zType[0] = 'V';
- if( pTerm->eOperator & WO_EQUIV ) zType[1] = 'E';
- if( ExprHasProperty(pTerm->pExpr, EP_FromJoin) ) zType[2] = 'L';
- sqlite3ExplainPrintf(v, "%s ", zType);
- sqlite3ExplainExpr(v, pTerm->pExpr);
-}
-#endif /* WHERETRACE_ENABLED && SQLITE_ENABLE_TREE_EXPLAIN */
-
-
#ifdef WHERETRACE_ENABLED
/*
** Print a WhereLoop object for debugging purposes
@@ -3819,27 +3798,6 @@ static void whereLoopPrint(WhereLoop *p, WhereClause *pWC){
sqlite3DebugPrintf(" f %05x N %d", p->wsFlags, p->nLTerm);
}
sqlite3DebugPrintf(" cost %d,%d,%d\n", p->rSetup, p->rRun, p->nOut);
-#ifdef SQLITE_ENABLE_TREE_EXPLAIN
- /* If the 0x100 bit of wheretracing is set, then show all of the constraint
- ** expressions in the WhereLoop.aLTerm[] array.
- */
- if( p->nLTerm && (sqlite3WhereTrace & 0x100)!=0 ){ /* WHERETRACE 0x100 */
- int i;
- Vdbe *v = pWInfo->pParse->pVdbe;
- sqlite3ExplainBegin(v);
- for(i=0; i<p->nLTerm; i++){
- WhereTerm *pTerm = p->aLTerm[i];
- if( pTerm==0 ) continue;
- sqlite3ExplainPrintf(v, " (%d) #%-2d ", i+1, (int)(pTerm-pWC->a));
- sqlite3ExplainPush(v);
- whereExplainTerm(v, pTerm);
- sqlite3ExplainPop(v);
- sqlite3ExplainNL(v);
- }
- sqlite3ExplainFinish(v);
- sqlite3DebugPrintf("%s", sqlite3VdbeExplanation(v));
- }
-#endif
}
#endif
@@ -6172,23 +6130,6 @@ WhereInfo *sqlite3WhereBegin(
/* Construct the WhereLoop objects */
WHERETRACE(0xffff,("*** Optimizer Start ***\n"));
- /* Display all terms of the WHERE clause */
-#if defined(WHERETRACE_ENABLED) && defined(SQLITE_ENABLE_TREE_EXPLAIN)
- if( sqlite3WhereTrace & 0x100 ){
- int i;
- Vdbe *v = pParse->pVdbe;
- sqlite3ExplainBegin(v);
- for(i=0; i<sWLB.pWC->nTerm; i++){
- sqlite3ExplainPrintf(v, "#%-2d ", i);
- sqlite3ExplainPush(v);
- whereExplainTerm(v, &sWLB.pWC->a[i]);
- sqlite3ExplainPop(v);
- sqlite3ExplainNL(v);
- }
- sqlite3ExplainFinish(v);
- sqlite3DebugPrintf("%s", sqlite3VdbeExplanation(v));
- }
-#endif
if( nTabList!=1 || whereShortCut(&sWLB)==0 ){
rc = whereLoopAddAll(&sWLB);
if( rc ) goto whereBeginError;