Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
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
- blocks
-
MDEV-27490 Allow full utf8mb4 for identifiers
- Stalled
- is blocked by
-
MDEV-31948 Add class DBNameBuffer, split check_db_name() into stages
- Closed
-
MDEV-31950 Cleanup: Move MEM_ROOT allocation methods from THD to Query_arena
- Closed
-
MDEV-31954 Cleanup in check_table_name() and check_db_name()
- Closed
-
MDEV-31972 Change parameter of make_sp_name*() from LEX_CSTRING to Lex_ident_sys_st
- Closed
-
MDEV-31974 Remove global function normalize_db_name()
- Closed
-
MDEV-31978 Turn ok_for_lower_case_names() to a method in Lex_ident_fs
- Closed
-
MDEV-31982 Remove old check_db_name() from prepare_db_action()
- Closed
-
MDEV-31986 Remove old check_db_name() from make_table_name_list()
- Closed
-
MDEV-31989 Cleanup Lex_ident_fs::check_body()
- Closed
-
MDEV-31991 Split class Database_qualified_name
- Closed
-
MDEV-31992 Automatic conversion from LEX_STRING to LEX_CSTRING
- Closed
-
MDEV-32002 Remove my_casedn_str() in append_identifier() context
- Closed
-
MDEV-32013 Add Field::val_lex_string_strmake()
- Closed
-
MDEV-32019 Replace my_casedn_str(local_buffer) to CharBuffer::copy_casedn()
- Closed
-
MDEV-32026 lowercase_table2.test failures in 11.3
- Closed
-
MDEV-32081 Remove my_casedn_str() from get_canonical_filename()
- Closed