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

Refactor check_db_name() to get a const argument

Details

    Description

      This task was originally a part of MDEV-31531, but now is a separate task, because it'll be quite a big change itself.

      check_db_name() converts the argument to lower case if lower_case_table_name>0.
      It uses my_casedn_str(), which converts the data to lower case in-place. As far as in-place conversion won't be possible after we switch to Unicode-14 casefolding rules (because conversion to lower case can increase the string length in Unicode-14), we need to refactor all uses of check_db_name() not to use in-place casefolding conversion.

      The current implementation of:

      bool check_db_name(LEX_STRING *db);
      

      should be changed to get a constant argument:

      bool check_db_name(const LEX_CSTRING &db);
      

      All old-style check_db_name() use cases should be changed in the way that in case of lower_case_table_names>1 the following sequence is done:

      • Convert an existing database name to a new database name in lower case into a NEW memory location.
      • Call the NEW version of check_db_name() on the NEW memory location.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Alexander Barkov made transition -
            Open In Progress
            1d 20h 52m 1
            Alexander Barkov made transition -
            In Progress In Review
            33s 1
            Dmitry Shulga made transition -
            In Review Stalled
            64d 22h 22m 1
            Alexander Barkov made transition -
            Stalled In Testing
            4d 23h 53m 1
            Ramesh Sivaraman made transition -
            In Testing Stalled
            27d 3h 4m 1
            Alexander Barkov made transition -
            Stalled Closed
            6d 20h 47m 1

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.