sql_string.cc:

Copy as is if src or dst are binary
This commit is contained in:
bar@bar.mysql.r18.ru 2003-03-17 13:40:40 +04:00
parent caf31a0790
commit 63a307bb38

View File

@ -232,6 +232,10 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs)
bool String::copy(const char *str, uint32 arg_length,
CHARSET_INFO *from_cs, CHARSET_INFO *to_cs)
{
if ((from_cs == &my_charset_bin) || (to_cs == &my_charset_bin))
{
return copy(str, arg_length, &my_charset_bin);
}
uint32 new_length= to_cs->mbmaxlen*arg_length;
if (alloc(new_length))
return TRUE;