Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-06 Thread Richard Hipp
On 2/6/19, Danny wrote: > This has been fixed by revision d840e. Thanks for the quick response, drh! Just to be clear: Dan found the fix. I merely checked it in. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-06 Thread Danny
This has been fixed by revision d840e. Thanks for the quick response, drh! Danny ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-05 Thread Danny
R Smith 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

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-05 Thread R Smith
On 2019/02/05 10:13 AM, Dominique Devienne wrote: On Tue, Feb 5, 2019 at 7:47 AM Keith Medcalf wrote: sqlite> select ... from tab left join tab as tab2 on 0 ... Can someone please educate me on this {{ on 0 }} join "condition" ? I'm not following what the intended meaning is... Must have

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-05 Thread Dominique Devienne
On Tue, Feb 5, 2019 at 7:47 AM Keith Medcalf wrote: > sqlite> select ... from tab left join tab as tab2 on 0 ... > Can someone please educate me on this {{ on 0 }} join "condition" ? I'm not following what the intended meaning is... Must have one, since OP "expects 1 row with one column

Re: [sqlite] Bug due to left join strength reduction optimization?

2019-02-04 Thread Keith Medcalf
ailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Danny >Sent: Monday, 4 February, 2019 23:24 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Bug due to left join strength reduction >optimization? > >The result of the query described below chan

[sqlite] Bug due to left join strength reduction optimization?

2019-02-04 Thread Danny
The result of the query described below changed (became incorrect, I believe) with the addition of the left join strength reduction optimization in revision dd568, and remains that way in trunk (2c876, at the time of writing). Consider the following statements: ``` CREATE TABLE tab (id INT);