Commit 61ca875e authored by unknown's avatar unknown

sql_string.cc:

  Copy as is if src or dst are binary


sql/sql_string.cc:
  Copy as is if src or dst are binary
parent 3a407e58
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment