SQLite

Check-in [3d4b4f4fb7]
Login

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

Overview
Comment:Allow UNION ALL compounds to be promoted up to replace a simple wrapper SELECT even if the compounds are joins.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3d4b4f4fb7c1d9f1c742fef884383e9f50f8630e
User & Date: drh 2011-12-10 17:17:17.131
Context
2011-12-10
23:18
Minor cleanups of the compound-subquery flattening logic. New test cases added for joins the compound subquery. (check-in: 5061d85ff9 user: drh tags: trunk)
17:17
Allow UNION ALL compounds to be promoted up to replace a simple wrapper SELECT even if the compounds are joins. (check-in: 3d4b4f4fb7 user: drh tags: trunk)
15:55
Import the experimental parse-tree explainer, with fixes, from the tree-explain branch. Disabled by default. Use SQLITE_ENABLE_TREE_EXPLAIN to turn it on. (check-in: bcbc7152d4 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/select.c.
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
      return 0;
    }
    for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
      if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
       || (pSub1->pPrior && pSub1->op!=TK_ALL) 
       || NEVER(pSub1->pSrc==0) || pSub1->pSrc->nSrc!=1
      ){
        return 0;
      }
    }

    /* Restriction 18. */
    if( p->pOrderBy ){







|







2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
      return 0;
    }
    for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
      if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
       || (pSub1->pPrior && pSub1->op!=TK_ALL) 
       || NEVER(pSub1->pSrc==0) || pSub1->pSrc->nSrc<1
      ){
        return 0;
      }
    }

    /* Restriction 18. */
    if( p->pOrderBy ){