aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 9c611001b..5111880c0 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -126,7 +126,6 @@ void sqlite3WhereAddExplainText(
#endif
{
VdbeOp *pOp = sqlite3VdbeGetOp(pParse->pVdbe, addr);
-
SrcItem *pItem = &pTabList->a[pLevel->iFrom];
sqlite3 *db = pParse->db; /* Database handle */
int isSearch; /* True for a SEARCH. False for SCAN. */
@@ -135,7 +134,6 @@ void sqlite3WhereAddExplainText(
#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
char *zMsg; /* Text to add to EQP output */
#endif
- const char *zFormat;
StrAccum str; /* EQP output string */
char zBuf[100]; /* Initial space for EQP output string */
@@ -150,14 +148,10 @@ void sqlite3WhereAddExplainText(
sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
str.printfFlags = SQLITE_PRINTF_INTERNAL;
- if( pItem->fg.fromExists ){
- zFormat = "SINGLETON %S";
- }else if( isSearch ){
- zFormat = "SEARCH %S";
- }else{
- zFormat = "SCAN %S";
- }
- sqlite3_str_appendf(&str, zFormat, pItem);
+ sqlite3_str_appendf(&str, "%s %S%s",
+ isSearch ? "SEARCH" : "SCAN",
+ pItem,
+ pItem->fg.fromExists ? " EXISTS" : "");
if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
const char *zFmt = 0;
Index *pIdx;