Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32002

Remove my_casedn_str() in append_identifier() context

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.