[sqlite] BUG: sqlite 3.8.11.x left join

2015-08-22 Thread Mark Brand
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

[sqlite] BUG: sqlite 3.8.11.x left join

2015-08-22 Thread Mark Brand
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 ( S

[sqlite] BUG: sqlite 3.8.11.x left join

2015-08-21 Thread Richard Hipp
The on-line fix (https://www.sqlite.org/src/artifact/24323faac?ln=3785) together with commentary and test cases is now on trunk (https://www.sqlite.org/src/info/351bc22fa9b5a2e5}. On 8/21/15, Richard Hipp wrote: > Thanks for the test case. The error seems to have been introduced by > check-in ht

[sqlite] BUG: sqlite 3.8.11.x left join

2015-08-21 Thread Richard Hipp
Thanks for the test case. The error seems to have been introduced by check-in https://www.sqlite.org/src/info/6df18e949d367629 which does some aggressive transformations on nested queries for improved performance. On 8/21/15, Mark Brand wrote: > Hi, > > For the query below, versions 3.8.11.0 and