aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authordrh <>2022-04-22 17:36:10 +0000
committerdrh <>2022-04-22 17:36:10 +0000
commitda653b897db2b7cc9cb636a5089860fa1520bf12 (patch)
tree353077d457648fb182b590bfe328ee1bc68a6d1c /src/printf.c
parent67f70bea06eea1e20124c4e97d2f545b3f10b473 (diff)
downloadsqlite-da653b897db2b7cc9cb636a5089860fa1520bf12.tar.gz
sqlite-da653b897db2b7cc9cb636a5089860fa1520bf12.zip
Improve EXPLAIN QUERY PLAN output and comments on bytecode listings by
distinguishing between "subquery" and "join" and using consistent names across EQP and bytecode. FossilOrigin-Name: a2d3ee92420ec564e31eb0005367cf7ff3d00bfaed5a98ffdbe17c91c95d9d97
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/printf.c b/src/printf.c
index 7bf6f2aeb..f55b6ef66 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -884,8 +884,14 @@ void sqlite3_str_vappendf(
sqlite3_str_appendall(pAccum, pItem->zName);
}else if( pItem->zAlias ){
sqlite3_str_appendall(pAccum, pItem->zAlias);
- }else if( ALWAYS(pItem->pSelect) ){
- sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
+ }else{
+ Select *pSel = pItem->pSelect;
+ assert( pSel!=0 );
+ if( pSel->selFlags & SF_NestedFrom ){
+ sqlite3_str_appendf(pAccum, "(join-%u)", pSel->selId);
+ }else{
+ sqlite3_str_appendf(pAccum, "(subquery-%u)", pSel->selId);
+ }
}
length = width = 0;
break;