SQLite Forum

problem report: incorrect join behavior
Login
A [bisect][1] shows that the error was introduced [here][4]
([2021-02-26][2]).

[1]: src:/timeline?nc&bid=ya26b6597e3nacd63062eby5f8bf99579n99aab32da1y05dbea9b26y15795a96a8na631c38d22sde9c86c9e4y310dac342enccb8cf5256ne4d1970ef1
[4]: src:/vdiff?from=310dac342e7b1f9b&to=e4d1970ef17b2330&nc
[2]: src:/timeline?n=20&c=e4d1970ef17b2330

Here is the cross-platform test case:

> ~~~
CREATE TABLE onerow(x INT);
INSERT INTO onerow(x) VALUES(0);
SELECT * 
FROM (
  SELECT null AS aaa FROM onerow
  UNION ALL
  SELECT 'missing' AS aaa FROM onerow
) AS a
LEFT JOIN (SELECT 1 AS bbb) AS b ON a.aaa IS NULL;
~~~