Out of memory due to the function json_valid
(1) By Jinsheng Ba (bajinsheng) on 2023-11-07 06:38:58 [source]
An unexpected out-of-memory error:
CREATE TABLE t0 (c0 INT);
CREATE INDEX i0 ON t0(c0);
INSERT INTO t0(c0) VALUES (1);
ANALYZE;
SELECT * FROM t0 WHERE t0.c0<=json_valid(2); --- out of memory
Environment:
Version: 3.45.0 (dev)
Commit ID: 7a63b5b65a79d15658a160d0878c7371941c67e9b48a7442762c68c60b77288a
Compile Options: make CFLAGS="-DSQLITE_ENABLE_STAT4" all
Client: CLI
Found by SQLancer: https://github.com/sqlancer/sqlancer/issues/899
(2) By Richard Hipp (drh) on 2023-11-07 12:35:06 in reply to 1 [link] [source]
Thanks for the clear and concise bug report.
The problem bisects to the introduction of support for JSON5. I will provide additional information after the problem has been fixed.