mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-32002 Remove my_casedn_str() in append_identifier() context
- Adding a helper function append_identifier_opt_casedn() - Reusing it in: Item_ident::print() Item_func_nextval::print() Item_func_setval::print() This change remove six my_casedn_str() calls and reduces the code size.
This commit is contained in:
@@ -1630,6 +1630,20 @@ append_identifier(THD *thd, String *packet, const char *name, size_t length)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Similar to append_identifier(), but with optional casedn conversion.
|
||||
*/
|
||||
bool append_identifier_opt_casedn(THD *thd, String *to,
|
||||
const LEX_CSTRING &ident, bool casedn)
|
||||
{
|
||||
if (!casedn)
|
||||
return append_identifier(thd, to, &ident);
|
||||
CharBuffer<MAX_ALIAS_NAME> buff;
|
||||
LEX_CSTRING ls= buff.copy_casedn(system_charset_info, ident).to_lex_cstring();
|
||||
return append_identifier(thd, to, &ls);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Get the quote character for displaying an identifier.
|
||||
|
||||
|
Reference in New Issue
Block a user