diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2019-03-12 01:09:55 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2019-03-12 01:09:55 +0400 |
commit | acb4a872049e0ac23a1fdf7a1aaf12ed2bf858a2 (patch) | |
tree | 0cf4e5095972b076c71619bbdffd88a11502e635 /sql/item_jsonfunc.cc | |
parent | 28e713dc12881e7f50207d0c642523ca3e630114 (diff) | |
download | mariadb-git-acb4a872049e0ac23a1fdf7a1aaf12ed2bf858a2.tar.gz |
MDEV-18886 JSON_ARRAY() does not recognise JSON argument.
JSON_ARRAY and JSON_OBJECT functions with no arguments now get the
connection charset. Item_func_convert_charset returns the correct
is_json() flag.
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r-- | sql/item_jsonfunc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 27bc97f4c5e..78eb58506ff 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -1488,9 +1488,10 @@ bool Item_func_json_array::fix_length_and_dec() if (arg_count == 0) { - collation.set(&my_charset_utf8_general_ci, + THD* thd= current_thd; + collation.set(thd->variables.collation_connection, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); - tmp_val.set_charset(&my_charset_utf8_general_ci); + tmp_val.set_charset(thd->variables.collation_connection); max_length= 2; return FALSE; } |