From 4d10273b4fd4e4fa8c479bf23afdd0d01cb3b0b5 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Sat, 24 Dec 2016 10:51:43 +0400 Subject: MDEV-11571 JSON_EXTRACT returns wrong results. Array counter didn't increment after an item was found. --- mysql-test/r/func_json.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/r/func_json.result') diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index 460ff8fa1d2..cace2f985ac 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/func_json.result @@ -209,6 +209,9 @@ json_extract('[10, 20, [{"a":3}, 30, 40]]', '$[2][*]') select json_extract('1', '$'); json_extract('1', '$') 1 +select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]'); +json_extract('[10, 20, [30, 40], 1, 10]', '$[1]') +20 select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word'); json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word') {"a":1, "b":{"c":1, "k1":"word"}, "d":[1, 2]} -- cgit v1.2.1