/ Check-in [7b457ea4]
Login

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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  4496   4496   
  4497   4497   #if defined(SQLITE_DEBUG)
  4498   4498   /*
  4499   4499   ** Generate a human-readable description of a the Select object.
  4500   4500   */
  4501   4501   static void explainOneSelect(Vdbe *pVdbe, Select *p){
  4502   4502     sqlite3ExplainPrintf(pVdbe, "SELECT ");
         4503  +  if( p->selFlags & (SF_Distinct|SF_Aggregate) ){
         4504  +    if( p->selFlags & SF_Distinct ){
         4505  +      sqlite3ExplainPrintf(pVdbe, "DISTINCT ");
         4506  +    }
         4507  +    if( p->selFlags & SF_Aggregate ){
         4508  +      sqlite3ExplainPrintf(pVdbe, "agg_flag ");
         4509  +    }
         4510  +    sqlite3ExplainNL(pVdbe);
         4511  +    sqlite3ExplainPrintf(pVdbe, "   ");
         4512  +  }
  4503   4513     sqlite3ExplainExprList(pVdbe, p->pEList);
  4504   4514     sqlite3ExplainNL(pVdbe);
  4505   4515     if( p->pSrc && p->pSrc->nSrc ){
  4506   4516       int i;
  4507   4517       sqlite3ExplainPrintf(pVdbe, "FROM ");
  4508   4518       sqlite3ExplainPush(pVdbe);
  4509   4519       for(i=0; i<p->pSrc->nSrc; i++){