Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
Let's replace the old style inplace check_db_name() in make_table_name_list():
if (check_db_name((LEX_STRING*)db_name)) |
return 0; // Impossible TABLE_SCHEMA name |
to the new style (non-modifying) code:
DBNameBuffer dbbuf(*db_name, lower_case_table_names);
|
const Lex_ident_db dbnorm= dbbuf.to_lex_ident_db(); |
if (!dbnorm.str) |
return 0; // Impossible TABLE_SCHEMA name |
Additionally, as agreed with Serg, let's add the "const" qualifier to the "db" parameter to functions ha_discover_table_names() and handlerton::discover_table_names() to make them look as follows:
int ha_discover_table_names(THD *thd, const LEX_CSTRING *db, MY_DIR *dirp, |
Discovered_table_list *result, bool reusable); |
struct handlerton |
{
|
...
|
int (*discover_table_names)(handlerton *hton, const LEX_CSTRING *db, |
MY_DIR *dir,
|
discovered_list *result);
|
...
|
};
|
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