1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
Monty
2020-07-16 16:30:06 +03:00
parent 2682458128
commit 61c15ebe32
18 changed files with 85 additions and 72 deletions

View File

@ -8981,8 +8981,8 @@ bool Type_handler::partition_field_append_value(
uint cnverr2= 0;
buf2.copy(res->ptr(), res->length(), res->charset(), field_cs, &cnverr2);
if (!cnverr2)
return str->append_introducer_and_hex(buf2.charset(), buf2.lex_cstring());
return str->append_introducer_and_hex(res->charset(), res->lex_cstring());
return str->append_introducer_and_hex(&buf2);
return str->append_introducer_and_hex(res);
}
StringBuffer<64> val(system_charset_info);