summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 972ae5afb16..54ab8f6aca1 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -4448,6 +4448,8 @@ bool Item_func_dyncol_create::prepare_arguments(bool force_names_arg)
case DYN_COL_DYNCOL:
case DYN_COL_STRING:
res= args[valpos]->val_str(&tmp);
+ if (res && defs[i].cs)
+ res->set_charset(defs[i].cs);
if (res &&
(vals[i].x.string.value.str= sql_strmake(res->ptr(), res->length())))
{