MDEV-9147: Character set is ignored in Dynamic Column for saved string

Fixed moving charset from definition to the value.
This commit is contained in:
Oleksandr Byelkin 2015-12-14 15:02:39 +01:00
commit a75ac82c2f
3 changed files with 24 additions and 5 deletions

View file

@ -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())))
{