1
0
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:
Monty
2020-08-14 20:22:43 +03:00
committed by Sergei Golubchik
parent 5c7d243b29
commit b3bc02f923
6 changed files with 46 additions and 36 deletions

View File

@ -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;
}