summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-05-02 15:16:01 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-05-02 15:16:01 +0400
commit4a484e7a207f927089893a0344afa15031803e5d (patch)
tree3a185aa2e7328f78e39dac60566e150ceb04fad4 /strings
parent42ad4f2821112be4e7bb4ca6d407cc72f9df6f8d (diff)
downloadmariadb-git-4a484e7a207f927089893a0344afa15031803e5d.tar.gz
MDEV-12351 Assertion `cur_step->type & JSON_PATH_KEY' failed in
json_find_path. The ..[0] path can be treated wrong on second json_find_path call.
Diffstat (limited to 'strings')
-rw-r--r--strings/json_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 5eda81d96c5..0e2a17b0ae0 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -1248,6 +1248,7 @@ static int handle_match(json_engine_t *je, json_path_t *p,
if (++next_step > p->last_step)
{
je->s.c_str= je->value_begin;
+ je->stack_p--;
return 1;
}
} while (next_step->type == JSON_PATH_ARRAY && next_step->n_item == 0);