small optimization

This commit is contained in:
serg@serg.mylan 2004-02-13 15:27:58 +01:00
parent 5914e5705c
commit 26c7003e37

View file

@ -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))