diff options
author | drh <> | 2022-04-22 18:07:38 +0000 |
---|---|---|
committer | drh <> | 2022-04-22 18:07:38 +0000 |
commit | d6bb6000eff360f76d736d13331816354d880c5f (patch) | |
tree | f7a5b47534d3655cd37648cfbf71e8f51d9abe4f /src | |
parent | da653b897db2b7cc9cb636a5089860fa1520bf12 (diff) | |
download | sqlite-d6bb6000eff360f76d736d13331816354d880c5f.tar.gz sqlite-d6bb6000eff360f76d736d13331816354d880c5f.zip |
Make use of the "%!S" format when running ExplainSubquery.
FossilOrigin-Name: 9425d79cb407dedc259655625369e023d22a04ef7db606ea3eefe7e4d662be1a
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c index 5f2465da0..5e90781ef 100644 --- a/src/select.c +++ b/src/select.c @@ -5555,10 +5555,8 @@ int sqlite3ExpandSubquery(Parse *pParse, SrcItem *pFrom){ pTab->nTabRef = 1; if( pFrom->zAlias ){ pTab->zName = sqlite3DbStrDup(pParse->db, pFrom->zAlias); - }else if( pSel->selFlags & SF_NestedFrom ){ - pTab->zName = sqlite3MPrintf(pParse->db, "(join-%u)", pSel->selId); }else{ - pTab->zName = sqlite3MPrintf(pParse->db, "(subquery-%u)", pSel->selId); + pTab->zName = sqlite3MPrintf(pParse->db, "%!S", pFrom); } while( pSel->pPrior ){ pSel = pSel->pPrior; } sqlite3ColumnsFromExprList(pParse, pSel->pEList,&pTab->nCol,&pTab->aCol); |