aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2021-03-19 19:44:56 +0000
committerdrh <>2021-03-19 19:44:56 +0000
commit6610e6a54fa48bc7a60263a54232559862f1176c (patch)
tree8be255f21050c2e939903f97c085875532c8963b /src
parentd218decec500b362eb814193451369243b473f12 (diff)
downloadsqlite-6610e6a54fa48bc7a60263a54232559862f1176c.tar.gz
sqlite-6610e6a54fa48bc7a60263a54232559862f1176c.zip
Further simplification of the EQP output. Only show "SUBQUERY n" if the
subquery is anonymous. FossilOrigin-Name: 1fadd30525dbf22678ba014b78af3a0fb33047692f073b7c62a90a028081ac48
Diffstat (limited to 'src')
-rw-r--r--src/printf.c7
-rw-r--r--src/treeview.c10
2 files changed, 3 insertions, 14 deletions
diff --git a/src/printf.c b/src/printf.c
index 58143e302..0fb3158e9 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -870,17 +870,14 @@ void sqlite3_str_vappendf(
}
if( pItem->zName ){
sqlite3_str_appendall(pAccum, pItem->zName);
- }else{
- sqlite3_str_append(pAccum, "(anonymous)", 11);
+ }else if( pItem->pSelect ){
+ sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
}
if( flag_altform2 ){
if( pItem->zAlias ){
sqlite3_str_append(pAccum, " AS ", 4);
sqlite3_str_appendall(pAccum, pItem->zAlias );
}
- if( pItem->pSelect ){
- sqlite3_str_appendf(pAccum, " SUBQUERY %u", pItem->pSelect->selId);
- }
}
length = width = 0;
break;
diff --git a/src/treeview.c b/src/treeview.c
index b696d764e..976558698 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -134,19 +134,11 @@ void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){
StrAccum x;
char zLine[100];
sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
- sqlite3_str_appendf(&x, "{%d:*}", pItem->iCursor);
- if( pItem->zDatabase ){
- sqlite3_str_appendf(&x, " %s.%s", pItem->zDatabase, pItem->zName);
- }else if( pItem->zName ){
- sqlite3_str_appendf(&x, " %s", pItem->zName);
- }
+ sqlite3_str_appendf(&x, "{%d:*} %!S", pItem->iCursor, pItem);
if( pItem->pTab ){
sqlite3_str_appendf(&x, " tab=%Q nCol=%d ptr=%p used=%llx",
pItem->pTab->zName, pItem->pTab->nCol, pItem->pTab, pItem->colUsed);
}
- if( pItem->zAlias ){
- sqlite3_str_appendf(&x, " (AS %s)", pItem->zAlias);
- }
if( pItem->fg.jointype & JT_LEFT ){
sqlite3_str_appendf(&x, " LEFT-JOIN");
}