On Mon, Sep 2, 2013 at 11:07 PM, Alexandre Courbot <gnu...@gmail.com> wrote:

> Hi everyone, (not subscribed to the ML, please CC)
>
> The following happens since 3.8.0 (tested on both 3.8.0 and 3.8.0.1):
>
> $ cat |sqlite3
> create table t1(id INTEGER);
> create table t2(id INTEGER, v INTEGER);
> insert into t1 values(1);
> select distinct t1.id from t1 left join t2 on t2.id = t1.id order by
> t2.v is null;
> Segmentation fault (core dumped)
>

Thanks for the simple test case!  See
http://www.sqlite.org/src/tktview/be84e357c03 for the ticket.  We'll get to
work on this right away.


>
> The same statements with 3.7.17 do *not* crash.
>
> Removing the "distinct" keyword, selecting t2.id instead of t1.id, or
> ordeting on just t2.v result in a successful query. This seems
> triggered by the usage of "distinct", a left join, and ordering on a
> condition, but I haven't managed to narrow it further down. I am also
> not familiar enough with SQLite's internals to debug it further
> unfortunately. Could this be related to the new query planner?
>
> Alex.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to