mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
The ".selecttrace 0x2000" command causes just the top-level parse tree to
be displayed, after all transformations, and showing the EQP iSelectId at each level. FossilOrigin-Name: ca34c2dd20ee071e6f8d60f91dbf474515a688ba57949143483da1641246cb25
This commit is contained in:
13
src/select.c
13
src/select.c
@@ -5343,6 +5343,9 @@ int sqlite3Select(
|
||||
#ifndef SQLITE_OMIT_EXPLAIN
|
||||
int iRestoreSelectId = pParse->iSelectId;
|
||||
pParse->iSelectId = pParse->iNextSelectId++;
|
||||
#if SELECTTRACE_ENABLED
|
||||
p->iSelectId = pParse->iSelectId;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
db = pParse->db;
|
||||
@@ -5486,7 +5489,10 @@ int sqlite3Select(
|
||||
if( p->pPrior ){
|
||||
rc = multiSelect(pParse, p, pDest);
|
||||
#if SELECTTRACE_ENABLED
|
||||
SELECTTRACE(1,pParse,p,("end compound-select processing\n"));
|
||||
SELECTTRACE(0x1,pParse,p,("end compound-select processing\n"));
|
||||
if( pParse->iSelectId==0 && (sqlite3SelectTrace & 0x2000)!=0 ){
|
||||
sqlite3TreeViewSelect(0, p, 0);
|
||||
}
|
||||
#endif
|
||||
explainSetInteger(pParse->iSelectId, iRestoreSelectId);
|
||||
return rc;
|
||||
@@ -6277,7 +6283,10 @@ select_end:
|
||||
sqlite3DbFree(db, sAggInfo.aCol);
|
||||
sqlite3DbFree(db, sAggInfo.aFunc);
|
||||
#if SELECTTRACE_ENABLED
|
||||
SELECTTRACE(1,pParse,p,("end processing\n"));
|
||||
SELECTTRACE(0x1,pParse,p,("end processing\n"));
|
||||
if( pParse->iSelectId==0 && (sqlite3SelectTrace & 0x2000)!=0 ){
|
||||
sqlite3TreeViewSelect(0, p, 0);
|
||||
}
|
||||
#endif
|
||||
explainSetInteger(pParse->iSelectId, iRestoreSelectId);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user