mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Added ErrConvString.lex_cstring() to simplify code
This allows us to use String::append() without using strlen(). The changes to the ErrConvString class where done by Alexander Barkov
This commit is contained in:
@ -864,11 +864,11 @@ extern "C" int my_wc_mb_utf8_null_terminated(CHARSET_INFO *cs,
|
||||
@param from_cs charset from convert
|
||||
|
||||
@retval
|
||||
result string
|
||||
result string length
|
||||
*/
|
||||
|
||||
char *err_conv(char *buff, uint to_length, const char *from,
|
||||
uint from_length, CHARSET_INFO *from_cs)
|
||||
size_t err_conv(char *buff, uint to_length, const char *from,
|
||||
uint from_length, CHARSET_INFO *from_cs)
|
||||
{
|
||||
char *to= buff;
|
||||
const char *from_start= from;
|
||||
@ -919,7 +919,7 @@ char *err_conv(char *buff, uint to_length, const char *from,
|
||||
&errors);
|
||||
to[res]= 0;
|
||||
}
|
||||
return buff;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user