1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-16209 JSON_EXTRACT in query crashes server.

The optimizer can create various item's over the original one,
    so we can't count on the exact item's type inside the comparison.
This commit is contained in:
Alexey Botchkov
2018-06-18 23:00:34 +04:00
parent eb77f8cf8d
commit 5ba6cee012
3 changed files with 47 additions and 24 deletions

View File

@ -742,3 +742,8 @@ json_extract('{"test":8.437e-5}','$.test')
select json_value('{"b":true}','$.b')=1;
json_value('{"b":true}','$.b')=1
1
CREATE TABLE t1 (c VARCHAR(8));
INSERT INTO t1 VALUES ('foo'),('bar');
SELECT * FROM t1 WHERE c IN (JSON_EXTRACT('{"a":"b"}', '$.*'));
c
DROP TABLE t1;