diff options
author | Monty <monty@mariadb.org> | 2020-08-14 20:22:43 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-05-19 22:27:29 +0200 |
commit | b3bc02f923f6002e6a5bd6446b80575292e1b0c7 (patch) | |
tree | 3d5032511ca892a1ce4c0649b3a046cb83c92c7f /storage | |
parent | 5c7d243b29257fe02edaea42730893d4d185ced5 (diff) | |
download | mariadb-git-b3bc02f923f6002e6a5bd6446b80575292e1b0c7.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 'storage')
-rw-r--r-- | storage/connect/ha_connect.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 9e1d7502dcf..1474af92933 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -3480,11 +3480,11 @@ bool ha_connect::get_error_message(int error, String* buf) if (trace(1)) htrc("GEM(%d): %s\n", error, g->Message); - - buf->append(ErrConvString(g->Message, strlen(g->Message), - &my_charset_latin1).ptr()); + buf->append(ErrConvString(g->Message, + strlen(g->Message), + &my_charset_latin1).lex_cstring()); } else - buf->append("Cannot retrieve error message"); + buf->append(STRING_WITH_LEN("Cannot retrieve error message")); DBUG_RETURN(false); } // end of get_error_message |