Thanks Keith and Charles; the Berkeley DB folks are looking into it, and I forwarded them this information.
Minollo

Yes, that old version (from about 2 years ago) crashes (on Windows).
No, the current one does not crash and produces two output lines.

This is using your test SQL with the spelling errors fixed.

CREATE TABLE mimmo (key TEXT PRIMARY KEY, value TEXT, valueJson TEXT, blockNo 
INTEGER, txnNo INTEGER, metadata TEXT);
INSERT INTO mimmo (key, valueJson) VALUES ('key2', 
'{"peppo":[["a","b"],["c","d"]]}');
SELECT s.key FROM mimmo AS s, json_each(json_extract(s.valueJson, '$.peppo')) AS a 
WHERE (SELECT COUNT(*) FROM json_each(a.value)) > 0;

SQLite version 3.30.0 2019-07-23 21:48:21
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE mimmo (key TEXT PRIMARY KEY, value TEXT, valueJson TEXT, 
blockNo INTEGER, txnNo INTEGER, metadata TEXT);
sqlite> INSERT INTO mimmo (key, valueJson) VALUES ('key2', 
'{"peppo":[["a","b"],["c","d"]]}');
sqlite> SELECT s.key FROM mimmo AS s, json_each(json_extract(s.valueJson, 
'$.peppo')) AS a WHERE (SELECT COUNT(*) FROM json_each(a.value)) > 0;
key2
key2

bisect complete
   1 GOOD    2018-01-27 18:55:18 6ea8ba312c38365d
   4 GOOD    2018-01-26 22:41:59 7daa687340e47597
   7 BAD     2018-01-26 18:59:25 029ebcd30cb261d9 CURRENT
   6 BAD     2018-01-26 18:37:34 ace0644a1a2a42a3
   5 BAD     2018-01-25 20:50:46 30b9258294e3028e
   3 BAD     2018-01-24 18:28:39 090a64faaac579c6
   2 BAD     2018-01-23 20:22:15 b58b60b2c0729b73

--
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>/-----Original Message----- />/From: sqlite-users [mailto:sqlite-users- />/bounces at mailinglists.sqlite.org <http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users>] On Behalf Of Charles Leifer />/Sent: Tuesday, 23 July, 2019 20:08 />/To: SQLite mailing list />/Subject: Re: [sqlite] Seg fault using json_each() subquery />//>/Partial traceback (bdb 18.1.32): />//>/Program received signal SIGSEGV, Segmentation fault. />/0x00007ffff798e560 in jsonEachColumn () from ./lib/libdb_sql-18.1.so />/(gdb) bt full />/#0 0x00007ffff798e560 in jsonEachColumn () from ./lib/libdb_sql- />/18.1.so />/No symbol table info available. />/#1 0x00007ffff79b29b6 in sqlite3VdbeExec () from ./lib/libdb_sql- />/18.1.so />/No symbol table info available. />//>/Unfortunately this is next-to-useless, but may provide a clue? />

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to