Under terms of MDEV-27490 we'll swith to Unicode-14.0.0. In this Unicode version a string can grow during a casedb conversion. We need to remove all my_casedn_str() calls done for identifiers.
Under tems of this task, let's remove my_casedn_str() whose results are further passed to append_identifier().
Let's add this helper function:
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);
|
}
|
and reuse it in:
- Item_ident::print()
- Item_func_nextval::print()
- Item_func_setval::print()
This change is also expected to reduce the code size.