1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-11472 JSON_ARRAY_INSERT returns incorrect results.

Item_func_json_array_insert::val_str fixed.
This commit is contained in:
Alexey Botchkov
2016-12-05 08:03:11 +04:00
parent df87dce03c
commit abb80d25f4
3 changed files with 17 additions and 13 deletions

View File

@@ -1051,7 +1051,7 @@ String *Item_func_json_array_insert::val_str(String *str)
if (s_p &&
(json_path_setup(&c_path->p,s_p->charset(),(const uchar *) s_p->ptr(),
(const uchar *) s_p->ptr() + s_p->length()) ||
c_path->p.last_step - 1 > c_path->p.steps ||
c_path->p.last_step - 1 < c_path->p.steps ||
c_path->p.last_step->type != JSON_PATH_ARRAY))
goto error;
c_path->parsed= c_path->constant;