summaryrefslogtreecommitdiff
path: root/sql/sql_error.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-08-14 20:22:43 +0300
committerMonty <monty@mariadb.org>2021-04-01 14:05:35 +0300
commit635b6c4057bf4c4a98f394d53bd5ecc2f5523da5 (patch)
tree021fe67e5ecc82f2464cbcc263affcd844c65c3c /sql/sql_error.cc
parent02db89f0a237ed48327ea662ef7e4d67f797029e (diff)
downloadmariadb-git-635b6c4057bf4c4a98f394d53bd5ecc2f5523da5.tar.gz
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
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r--sql/sql_error.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index 9af57ea6c01..bb47502b3ce 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -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;
}