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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user