Just realized that this simpler case shows the same problem: SELECT * FROM ( SELECT 'apple' fruit UNION ALL SELECT 'banana' ) a LEFT JOIN ( SELECT 1 isyellow ) c ON a.fruit='banana' ;
On 22/08/15 00:58, Mark Brand wrote: > Hi, > > For the query below, versions 3.8.11.0 and 3.8.11.1 return only 1 row. > For some reason, the LEFT JOIN seems to behave like a JOIN. > > Older versions (tested 3.8.7.4 and 3.8.10.2) correctly return 2 rows. > > SELECT * > FROM ( > SELECT 'apple' fruit > UNION ALL SELECT 'banana' > ) a > JOIN ( > SELECT 'apple' fruit > UNION ALL SELECT 'banana' > ) b ON a.fruit=b.fruit > LEFT JOIN ( > SELECT 1 isyellow > ) c ON b.fruit='banana' > ; > > regards, > > Mark