/ Check-in [8088d8ca]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not restore the iSelectId value until after the last SELECTTRACE when debugging Select processing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8088d8cac317adb96e357a8f4a196d7c1e0115af9c2335f167b4d7e7154299b0
User & Date: drh 2018-04-23 17:09:58
Context
2018-04-23
17:18
The ".selecttrace 4" command now shows only a single parse tree after name resolution. check-in: 5682146e user: drh tags: trunk
17:09
Do not restore the iSelectId value until after the last SELECTTRACE when debugging Select processing. check-in: 8088d8ca user: drh tags: trunk
17:02
In the ".selecttrace" output, include the EXPLAIN QUERY PLAN iSelectId as part of each Select identifier. check-in: 5c6339f9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  5482   5482   
  5483   5483   #ifndef SQLITE_OMIT_COMPOUND_SELECT
  5484   5484     /* Handle compound SELECT statements using the separate multiSelect()
  5485   5485     ** procedure.
  5486   5486     */
  5487   5487     if( p->pPrior ){
  5488   5488       rc = multiSelect(pParse, p, pDest);
  5489         -    explainSetInteger(pParse->iSelectId, iRestoreSelectId);
  5490   5489   #if SELECTTRACE_ENABLED
  5491   5490       SELECTTRACE(1,pParse,p,("end compound-select processing\n"));
  5492   5491   #endif
         5492  +    explainSetInteger(pParse->iSelectId, iRestoreSelectId);
  5493   5493       return rc;
  5494   5494     }
  5495   5495   #endif
  5496   5496   
  5497   5497     /* For each term in the FROM clause, do two things:
  5498   5498     ** (1) Authorized unreferenced tables
  5499   5499     ** (2) Generate code for all sub-queries
................................................................................
  6270   6270     ** set the return code to 1. Otherwise 0. */
  6271   6271     rc = (pParse->nErr>0);
  6272   6272   
  6273   6273     /* Control jumps to here if an error is encountered above, or upon
  6274   6274     ** successful coding of the SELECT.
  6275   6275     */
  6276   6276   select_end:
  6277         -  explainSetInteger(pParse->iSelectId, iRestoreSelectId);
  6278   6277     sqlite3ExprListDelete(db, pMinMaxOrderBy);
  6279   6278     sqlite3DbFree(db, sAggInfo.aCol);
  6280   6279     sqlite3DbFree(db, sAggInfo.aFunc);
  6281   6280   #if SELECTTRACE_ENABLED
  6282   6281     SELECTTRACE(1,pParse,p,("end processing\n"));
  6283   6282   #endif
         6283  +  explainSetInteger(pParse->iSelectId, iRestoreSelectId);
  6284   6284     return rc;
  6285   6285   }