summaryrefslogtreecommitdiff
path: root/mysql-test/main/func_json.test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-08-03 07:12:27 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-08-03 07:12:27 +0200
commitaf143474d8925cdbcfc0795a2bc274cbeaad8889 (patch)
tree790022e64c90ce37310d20f1de25af35b0f722c9 /mysql-test/main/func_json.test
parent7b500f04fb0baf56b02583f82982508203e58d38 (diff)
parent48e35b8cf61cbedb515787762708afe7bd75386b (diff)
downloadmariadb-git-af143474d8925cdbcfc0795a2bc274cbeaad8889.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'mysql-test/main/func_json.test')
-rw-r--r--mysql-test/main/func_json.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 91e283829df..db474e38a2c 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -614,6 +614,20 @@ SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}'
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 #