1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-13633 JSON_ARRAY() - bad output with some UTF8 characters.

set_charset() calls added for Item_func_json_arran
        and Item_func_json_object::val_str-s.
This commit is contained in:
Alexey Botchkov
2017-09-13 15:17:28 +04:00
parent a237a92099
commit dc82f70e9f
3 changed files with 14 additions and 0 deletions

View File

@ -1473,6 +1473,7 @@ String *Item_func_json_array::val_str(String *str)
uint n_arg;
str->length(0);
str->set_charset(collation.collation);
if (str->append("[", 1) ||
((arg_count > 0) && append_json_value(str, args[0], &tmp_val)))
@ -1797,6 +1798,7 @@ String *Item_func_json_object::val_str(String *str)
uint n_arg;
str->length(0);
str->set_charset(collation.collation);
if (str->append("{", 1) ||
(arg_count > 0 &&