R Smith <ryansmit...@gmail.com> writes: > As a matter of interest - what happens when the aliasing is taken out of > the loop and the query changes to: > > CREATE TABLE tab (id INT); > INSERT INTO tab VALUES (1); > SELECT 1 > FROM tab LEFT JOIN tab AS tab2 ON 0 > WHERE (tab2.id IS NOT NULL) = 0 > ; > > I don't have that broken version currently, so can't test on my side, but I'm > assuming your example is minimal and it works if anything is changed, which > means it's likely the fault of the logic that checks the aliased value > (unless the above query still fails, in which case my assumption is wrong and > the above is a better test case).
In fact, that returns the incorrect empty result as well; I suppose I didn't manage to minimize all the way. Good catch! Replacing the end of the WHERE clause with "is 0" still returns one row, as in Keith's example, while "= 0", "= false", and "is false" all give no rows. Danny _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users