diff options
-rw-r--r-- | sql/sql_string.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index b6425003af3..d796c53fb52 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -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; |