diff options
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index efb7401779c..ab71f324732 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -525,8 +525,7 @@ void field_conv(Field *to,Field *from) if (!blob->value.is_alloced() && from->real_type() != FIELD_TYPE_STRING) blob->value.copy(); - blob->store(blob->value.ptr(),blob->value.length(), - to->binary()?default_charset_info:((Field_str*)to)->charset()); + blob->store(blob->value.ptr(),blob->value.length(),to->charset()); return; } if ((from->result_type() == STRING_RESULT && @@ -538,8 +537,7 @@ 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(), - to->binary()?default_charset_info:((Field_str*)to)->charset()); + to->store(result.c_ptr_quick(),result.length(),to->charset()); // QQ: what to do if "from" and "to" are of dirrent charsets? } else if (from->result_type() == REAL_RESULT) |