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

2018-04-04 Thread petern
Two points. 1. If any NULL constraint on any vtable is to return no rows, then why does the vtable code get called in the first place? 2. The shipped extension series.c had some NULL default constraint behavior. Are such constraint defaults now bad form? In other words, the LEFT strength

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

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

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

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

[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