From 9320d8ae30c18420bef659618175836221d363ea Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Sun, 11 Dec 2016 01:12:33 +0400 Subject: MDEV-11453 JSON_CONTAINS returns incorrect values. The weird logic of json_contains was implemented. --- strings/json_lib.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'strings') diff --git a/strings/json_lib.c b/strings/json_lib.c index a9498070195..015ce1f39f8 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1182,6 +1182,13 @@ int json_skip_level(json_engine_t *j) int json_skip_key(json_engine_t *j) { + if (j->state == JST_KEY) + { + while (json_read_keyname_chr(j) == 0); + if (j->s.error) + return 1; + } + if (json_read_value(j)) return 1; -- cgit v1.2.1