Re: [sqlite] generate_series can theoretically behave differently in SQLite 3.23.0

2018-04-03 Thread E.Pasma
Petern wrote: I think your left join reduction regression change happens on any vtable hidden column filter reference to an outer scope column. A CTE duplicates your finding below... Hello Peter, from your message I realize that generate_series is no longer essentiall since SQLite offers C

Re: [sqlite] generate_series can theoretically behave differently in SQLite 3.23.0

2018-04-03 Thread E.Pasma
Richard Hipp wrote: ... I'm testing a patch now that causes the LEFT JOIN strength reduction optimization to assume that NULL arguments to a virtual table constraint can return a TRUE result. But I'm wondering, since this is really a work-around to problems in virtual table implementations, if

Re: [sqlite] generate_series can theoretically behave differently in SQLite 3.23.0

2018-04-03 Thread Richard Hipp
On 4/3/18, Richard Hipp wrote: > > Probably there will be a 3.23.1 patch release later today. > Or, maybe not. If the series.c file is compiled with -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 then the generate_series() virtual table behaves correctly, and Edzard's example gives a correct answer both be

Re: [sqlite] generate_series can theoretically behave differently in SQLite 3.23.0

2018-04-03 Thread petern
I think your left join reduction regression change happens on any vtable hidden column filter reference to an outer scope column. A CTE duplicates your finding below. SQLite 3.23.0 2018-04-02 11:04:16 736b53f57f70b23172c30880186dce 7ad9baa3b74e3838cae5847cffb98f5cd2 sqlite> WITH t1(x) AS (VALUES(

Re: [sqlite] generate_series can theoretically behave differently in SQLite 3.23.0

2018-04-03 Thread Richard Hipp
On 4/3/18, E.Pasma wrote: > Hello, below is a case where the generate_series virtual table behaves > differently with SQLite 3.23. It is a purely artificial case. Does > anyoone have an opinion about it? Having pondered this overnight, I decided that it should probably be fixed. There is now a t

[sqlite] generate_series can theoretically behave differently in SQLite 3.23.0

2018-04-03 Thread E . Pasma
Hello, below is a case where the generate_series virtual table behaves differently with SQLite 3.23. It is a purely artificial case. Does anyoone have an opinion about it? The issue comes from the fact that generate_series does not check if a supposed integer input value happens to be NULL.