diff options
author | bar@gw.udmsearch.izhnet.ru <> | 2002-06-21 14:46:50 +0500 |
---|---|---|
committer | bar@gw.udmsearch.izhnet.ru <> | 2002-06-21 14:46:50 +0500 |
commit | d616c90188f2c9903b6790720cd6172cbdada7dd (patch) | |
tree | cb8b0f04282a8a4b8aaf26c2e3284e91cdf3af98 /sql/field_conv.cc | |
parent | c5b8f48cf5acecb4f50155a98bf83f4eefd53484 (diff) | |
download | mariadb-git-d616c90188f2c9903b6790720cd6172cbdada7dd.tar.gz |
Fixed charset problem on UPDATE in non-default-charset field
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 3b6de1383e2..3b8a2ee791c 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -520,7 +520,9 @@ void field_conv(Field *to,Field *from) char buff[MAX_FIELD_WIDTH]; String result(buff,sizeof(buff),default_charset_info); from->val_str(&result,&result); - to->store(result.c_ptr_quick(),result.length(),default_charset_info); + to->store(result.c_ptr_quick(),result.length(), + to->binary()?default_charset_info:((Field_str*)to)->charset()); + // QQ: what to do if "from" and "to" are of dirrent charsets? } else if (from->result_type() == REAL_RESULT) to->store(from->val_real()); |