1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-29188 Crash in JSON_EXTRACT

If we have null_value set then decimal/string value/result shoud be 0 pointer.
This commit is contained in:
Oleksandr Byelkin
2022-07-28 16:17:03 +02:00
parent 4b77d38c26
commit cbcc0101ee
4 changed files with 34 additions and 3 deletions

View File

@ -613,6 +613,20 @@ SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}'
UNION
SELECT JSON_VALID('{"\\"": null}'), '{"\\"": null}';
--echo #
--echo # MDEV-29188: Crash in JSON_EXTRACT
--echo #
CREATE TABLE t1 (j JSON);
INSERT INTO t1 VALUES
('{"ID": "4", "Name": "Betty", "Age": 19}'),
('[10, 20, [30, 40]]');
SELECT * FROM t1 WHERE JSON_EXTRACT(j, '$.Age')=19;
drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #