From dc82f70e9f203fb6cd2e9dd2b43beb1a2d6e791e Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Wed, 13 Sep 2017 15:17:28 +0400 Subject: 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. --- sql/item_jsonfunc.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/item_jsonfunc.cc') diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index a39b5f3f263..6398929defc 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -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 && -- cgit v1.2.1