Commit 26c7003e authored by serg@serg.mylan's avatar serg@serg.mylan

small optimization

parent 5914e570
......@@ -437,7 +437,7 @@ bool String::append(const char *s,uint32 arg_length, CHARSET_INFO *cs)
if (!arg_length) // Default argument
if (!(arg_length= (uint32) strlen(s)))
return FALSE;
if (str_charset->mbmaxlen > 1)
if (cs != str_charset && str_charset->mbmaxlen > 1)
{
uint32 add_length=arg_length * str_charset->mbmaxlen;
if (realloc(str_length+ add_length))
......
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