Segfault on query related to json_each in where clause

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Segfault on query related to json_each in where clause

wmertens
Crashes on 3.19, 3.20, but not on 3.15:

$ sqlite3
SQLite version 3.20.0 2017-08-01 13:24:15
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table t(json JSON);
sqlite> select * from t WHERE(EXISTS(SELECT 1 FROM json_each(t.json,
"$.foo") j where j.value = 'meep'));
Segmentation fault: 11

:-/

Wout.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault on query related to json_each in where clause

Richard Hipp-3
Thanks for the bug report.  This problem was previously described by
ticket https://sqlite.org/src/info/b899b6 and was fixed by check-in
https://sqlite.org/src/info/c7f9f47b23 on 2017-09-04.  The re-release
snapshot on the https://sqlite.org/download.html download page
contains this fix (among others).

On 10/4/17, Wout Mertens <[hidden email]> wrote:

> Crashes on 3.19, 3.20, but not on 3.15:
>
> $ sqlite3
> SQLite version 3.20.0 2017-08-01 13:24:15
> Enter ".help" for usage hints.
> Connected to a transient in-memory database.
> Use ".open FILENAME" to reopen on a persistent database.
> sqlite> create table t(json JSON);
> sqlite> select * from t WHERE(EXISTS(SELECT 1 FROM json_each(t.json,
> "$.foo") j where j.value = 'meep'));
> Segmentation fault: 11
>
> :-/
>
> Wout.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Segfault on query related to json_each in where clause

wmertens
Oh interesting, I am seeing it with 3.19.3 contrary to the bug report…

Mind you this is High Sierra so Apple may have messed with the build…

/usr/bin/sqlite3 --version
3.19.3 2017-06-27 16:48:08
2b0954060fe10d6de6d479287dd88890f1bef6cc1beca11bc6cdb79f72e2377b

> Thanks for the bug report. This problem was previously described by ticket https://sqlite.org/src/info/b899b6 and was fixed by check-in https://sqlite.org/src/info/c7f9f47b23
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users