diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-10-06 09:28:33 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-10-06 09:28:33 +0400 |
commit | a3ba8c3660aefa9bd7921f8183f13246bfb90432 (patch) | |
tree | d969114e36ada1fcd90d65875c45b3d2a5556103 /sql/item_jsonfunc.cc | |
parent | 41e581b30b7c6466369f042a58b78c2a2820b3a9 (diff) | |
download | mariadb-git-a3ba8c3660aefa9bd7921f8183f13246bfb90432.tar.gz |
MDEV-13703 Illegal mix of collations for operation 'json_object' on
using JSON_UNQUOTE as an argument.
The coercibility and repertoire should be set properly for the
JSON_UNQUOTE.
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r-- | sql/item_jsonfunc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 8561e08426b..f7be5b68892 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -581,7 +581,8 @@ String *Item_func_json_quote::val_str(String *str) void Item_func_json_unquote::fix_length_and_dec() { - collation.set(&my_charset_utf8_general_ci); + collation.set(&my_charset_utf8_general_ci, + DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); max_length= args[0]->max_length; maybe_null= 1; } @@ -1458,7 +1459,8 @@ void Item_func_json_array::fix_length_and_dec() if (arg_count == 0) { - collation.set(&my_charset_utf8_general_ci); + collation.set(&my_charset_utf8_general_ci, + DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); tmp_val.set_charset(&my_charset_utf8_general_ci); max_length= 2; return; |