summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_json.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-12-24 10:51:43 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-12-24 10:51:43 +0400
commit4d10273b4fd4e4fa8c479bf23afdd0d01cb3b0b5 (patch)
treee3b18c85f03239cee0cdc5dadc6060f6439da9c9 /mysql-test/t/func_json.test
parentbbb3fb318ebeec4c5e5e932d9b20bd86def753e5 (diff)
downloadmariadb-git-4d10273b4fd4e4fa8c479bf23afdd0d01cb3b0b5.tar.gz
MDEV-11571 JSON_EXTRACT returns wrong results.
Array counter didn't increment after an item was found.
Diffstat (limited to 'mysql-test/t/func_json.test')
-rw-r--r--mysql-test/t/func_json.test1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysql-test/t/func_json.test b/mysql-test/t/func_json.test
index 72b7b946536..7e10a4fb203 100644
--- a/mysql-test/t/func_json.test
+++ b/mysql-test/t/func_json.test
@@ -77,6 +77,7 @@ select json_extract(json_object('foo', 'foobar'),'$');
select json_extract('[10, 20, [30, 40]]', '$[2][*]');
select json_extract('[10, 20, [{"a":3}, 30, 40]]', '$[2][*]');
select json_extract('1', '$');
+select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]');
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word');
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3);