1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Do not restore the iSelectId value until after the last SELECTTRACE when

debugging Select processing.

FossilOrigin-Name: 8088d8cac317adb96e357a8f4a196d7c1e0115af9c2335f167b4d7e7154299b0
This commit is contained in:
drh
2018-04-23 17:09:58 +00:00
parent b3b0d317e0
commit 1bddf23b89
3 changed files with 9 additions and 9 deletions

View File

@@ -5486,10 +5486,10 @@ int sqlite3Select(
*/
if( p->pPrior ){
rc = multiSelect(pParse, p, pDest);
explainSetInteger(pParse->iSelectId, iRestoreSelectId);
#if SELECTTRACE_ENABLED
SELECTTRACE(1,pParse,p,("end compound-select processing\n"));
#endif
explainSetInteger(pParse->iSelectId, iRestoreSelectId);
return rc;
}
#endif
@@ -6274,12 +6274,12 @@ int sqlite3Select(
** successful coding of the SELECT.
*/
select_end:
explainSetInteger(pParse->iSelectId, iRestoreSelectId);
sqlite3ExprListDelete(db, pMinMaxOrderBy);
sqlite3DbFree(db, sAggInfo.aCol);
sqlite3DbFree(db, sAggInfo.aFunc);
#if SELECTTRACE_ENABLED
SELECTTRACE(1,pParse,p,("end processing\n"));
#endif
explainSetInteger(pParse->iSelectId, iRestoreSelectId);
return rc;
}