SQLite Forum

problem report: incorrect join behavior
Login
Simplified test case that omits the UNION ALL:

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

The above should return one row of output, and it does in PostgreSQL,
MySQL, SQL Server, and SQLite version 3.34.0 and earlier.  But in 3.35.0
through the latest check-in, it returns zero rows.