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

Allow UNION ALL compounds to be promoted up to replace a simple wrapper

SELECT even if the compounds are joins.

FossilOrigin-Name: 3d4b4f4fb7c1d9f1c742fef884383e9f50f8630e
This commit is contained in:
drh
2011-12-10 17:17:17 +00:00
parent 678a9aa7bd
commit 1acc6cbe00
3 changed files with 8 additions and 8 deletions

View File

@@ -2812,7 +2812,7 @@ static int flattenSubquery(
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
|| NEVER(pSub1->pSrc==0) || pSub1->pSrc->nSrc<1
){
return 0;
}