summaryrefslogtreecommitdiff
path: root/sql/item_jsonfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r--sql/item_jsonfunc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc
index 588d41479e1..fe8784a7073 100644
--- a/sql/item_jsonfunc.cc
+++ b/sql/item_jsonfunc.cc
@@ -1489,9 +1489,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;
}