Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
Under terms of MDEV-31606 we'll split check_db_name() in two separate stages:
- On the first stage, the database name will be converted to lower case if lowercase-table-table says so.
- On the second stage, the database name will actually be validated.
The lower-cased database name is currently created:
- either on THD::mem_root (in many cases)
- or in a fixed size stack buffer (in rare cases, see show_create_db() as an example).
Under terms of this task we'll do the following
- Add a new class Lex_ident_fs, to store identifiers for database objects stored on disk whose case sensitivity depend on lower-case-table-name.
- Extract the validation code from check_db_name() to Lex_ident_fs::check_db_name(). This method will get a constant argument with the database name.
- Add a new class DBNameBuffer to store an optionally lower-cased database name in a stack variable
- Replace check_db_name() in show_create_db(), as well as in other places where it is suitable to use a temporary stack variable, to DBNameBuffer instantiation followed by a Lex_ident_fs::check_db_name() call.
Note, the code which creates a lower-cases database name on THD::mem_root will be modified later, under terms of MDEV-31606.
Attachments
Issue Links
- blocks
-
MDEV-31531 Remove my_casedn_str() and my_caseup_str()
- Closed
-
MDEV-31606 Refactor check_db_name() to get a const argument
- Closed
- causes
-
MDEV-32026 lowercase_table2.test failures in 11.3
- Closed