diff options
author | Monty <monty@mariadb.org> | 2020-07-16 16:30:06 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-07-23 10:54:32 +0300 |
commit | 61c15ebe323d4d6f02fab86c405b2613e5784961 (patch) | |
tree | 1b8eccd555f01f8819594bbbc373aba55a2c4694 /sql/protocol.cc | |
parent | 26824581281fcb2b2251585d8081de38d561ca93 (diff) | |
download | mariadb-git-61c15ebe323d4d6f02fab86c405b2613e5784961.tar.gz |
Remove String::lex_string() and String::lex_cstring()
- Better to use 'String *' directly.
- Added String::get_value(LEX_STRING*) for the few cases where we want to
convert a String to LEX_CSTRING.
Other things:
- Use StringBuffer for some functions to avoid mallocs
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index a97e0d0997d..55373bcd2b5 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -864,12 +864,13 @@ bool Protocol_text::store_field_metadata(const THD * thd, { Send_field_packed_extended_metadata metadata; metadata.pack(field); + /* Don't apply character set conversion: extended metadata is a binary encoded data. */ - if (store_lex_cstring(metadata.lex_cstring(), cs, - MY_REPERTOIRE_UNICODE30, &my_charset_bin)) + if (store_binary_string(&metadata, cs, + MY_REPERTOIRE_UNICODE30)) return true; } if (packet->realloc(packet->length() + 12)) |