aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wherecode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index f1c6711af..0bd1733b7 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -132,7 +132,9 @@ void sqlite3WhereAddExplainText(
int isSearch; /* True for a SEARCH. False for SCAN. */
WhereLoop *pLoop; /* The controlling WhereLoop object */
u32 flags; /* Flags that describe this loop */
+#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
char *zMsg; /* Text to add to EQP output */
+#endif
StrAccum str; /* EQP output string */
char zBuf[100]; /* Initial space for EQP output string */
@@ -215,8 +217,10 @@ void sqlite3WhereAddExplainText(
sqlite3_str_append(&str, " (~1 row)", 9);
}
#endif
+#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
zMsg = sqlite3StrAccumFinish(&str);
sqlite3ExplainBreakpoint("",zMsg);
+#endif
assert( pOp->opcode==OP_Explain );
assert( pOp->p4type==P4_DYNAMIC || pOp->p4.z==0 );
@@ -355,9 +359,10 @@ void sqlite3WhereAddScanStatus(
}
}else{
int addr;
+ VdbeOp *pOp;
assert( pSrclist->a[pLvl->iFrom].fg.isSubquery );
addr = pSrclist->a[pLvl->iFrom].u4.pSubq->addrFillSub;
- VdbeOp *pOp = sqlite3VdbeGetOp(v, addr-1);
+ pOp = sqlite3VdbeGetOp(v, addr-1);
assert( sqlite3VdbeDb(v)->mallocFailed || pOp->opcode==OP_InitCoroutine );
assert( sqlite3VdbeDb(v)->mallocFailed || pOp->p2>addr );
sqlite3VdbeScanStatusRange(v, addrExplain, addr, pOp->p2-1);