/ Check-in [7b457ea4]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Additional detail added to the tree-explain output for SELECT statements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tree-explain
Files: files | file ages | folders
SHA1: 7b457ea4551ba411a4747d74fb78b795cc8d9ee6
User & Date: drh 2011-12-07 22:49:42
Context
2011-12-10
14:44
Merge the latest trunk changes into tree-explain branch. Closed-Leaf check-in: 1a360da0 user: drh tags: tree-explain
2011-12-07
22:49
Additional detail added to the tree-explain output for SELECT statements. check-in: 7b457ea4 user: drh tags: tree-explain
15:33
More compact notation for the parse-tree view. check-in: 0eb3f8b1 user: drh tags: tree-explain
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

4496
4497
4498
4499
4500
4501
4502










4503
4504
4505
4506
4507
4508
4509

#if defined(SQLITE_DEBUG)
/*
** Generate a human-readable description of a the Select object.
*/
static void explainOneSelect(Vdbe *pVdbe, Select *p){
  sqlite3ExplainPrintf(pVdbe, "SELECT ");










  sqlite3ExplainExprList(pVdbe, p->pEList);
  sqlite3ExplainNL(pVdbe);
  if( p->pSrc && p->pSrc->nSrc ){
    int i;
    sqlite3ExplainPrintf(pVdbe, "FROM ");
    sqlite3ExplainPush(pVdbe);
    for(i=0; i<p->pSrc->nSrc; i++){







>
>
>
>
>
>
>
>
>
>







4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519

#if defined(SQLITE_DEBUG)
/*
** Generate a human-readable description of a the Select object.
*/
static void explainOneSelect(Vdbe *pVdbe, Select *p){
  sqlite3ExplainPrintf(pVdbe, "SELECT ");
  if( p->selFlags & (SF_Distinct|SF_Aggregate) ){
    if( p->selFlags & SF_Distinct ){
      sqlite3ExplainPrintf(pVdbe, "DISTINCT ");
    }
    if( p->selFlags & SF_Aggregate ){
      sqlite3ExplainPrintf(pVdbe, "agg_flag ");
    }
    sqlite3ExplainNL(pVdbe);
    sqlite3ExplainPrintf(pVdbe, "   ");
  }
  sqlite3ExplainExprList(pVdbe, p->pEList);
  sqlite3ExplainNL(pVdbe);
  if( p->pSrc && p->pSrc->nSrc ){
    int i;
    sqlite3ExplainPrintf(pVdbe, "FROM ");
    sqlite3ExplainPush(pVdbe);
    for(i=0; i<p->pSrc->nSrc; i++){