mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02: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:
parent
2682458128
commit
61c15ebe32
18 changed files with 85 additions and 72 deletions
|
|
@ -149,18 +149,25 @@ public:
|
|||
|
||||
// Various useful wrappers for the virtual store*() methods.
|
||||
// Backward wrapper for store_str()
|
||||
bool store(const char *from, size_t length, CHARSET_INFO *cs,
|
||||
my_repertoire_t repertoire= MY_REPERTOIRE_UNICODE30)
|
||||
inline bool store(const char *from, size_t length, CHARSET_INFO *cs,
|
||||
my_repertoire_t repertoire= MY_REPERTOIRE_UNICODE30)
|
||||
{
|
||||
return store_str(from, length, cs, repertoire, character_set_results());
|
||||
}
|
||||
bool store_lex_cstring(const LEX_CSTRING &s,
|
||||
CHARSET_INFO *fromcs,
|
||||
my_repertoire_t from_repertoire,
|
||||
CHARSET_INFO *tocs)
|
||||
inline bool store_lex_cstring(const LEX_CSTRING &s,
|
||||
CHARSET_INFO *fromcs,
|
||||
my_repertoire_t from_repertoire,
|
||||
CHARSET_INFO *tocs)
|
||||
{
|
||||
return store_str(s.str, (uint) s.length, fromcs, from_repertoire, tocs);
|
||||
}
|
||||
inline bool store_binary_string(Binary_string *str,
|
||||
CHARSET_INFO *fromcs,
|
||||
my_repertoire_t from_repertoire)
|
||||
{
|
||||
return store_str(str->ptr(), (uint) str->length(), fromcs, from_repertoire,
|
||||
&my_charset_bin);
|
||||
}
|
||||
bool store_ident(const LEX_CSTRING &s,
|
||||
my_repertoire_t repertoire= MY_REPERTOIRE_UNICODE30)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue