diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-11-06 17:01:12 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-11-06 17:01:12 +0400 |
commit | 6d7d19b860e0b3b9443b8059d36fb497029481d6 (patch) | |
tree | 51f69fc95a2c0f5cb568b1512cae6655412ab345 /sql/field_conv.cc | |
parent | 245f453383489a64c49178d6600df7785e211fe7 (diff) | |
download | mariadb-git-6d7d19b860e0b3b9443b8059d36fb497029481d6.tar.gz |
Some charset code clean-ups
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) |