1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-25292 Table_name class for (db, table_name, alias)

TABLE_SHARE, TABLE_LIST inherit Table_name

rename_table_and_triggers(), rename_check_preconditions() use
Table_name instead TABLE_LIST.

TODO:
  - Table_ident should inherit Table_name too;
  - Use TABLE_SHARE::alias instead of TABLE::alias.
This commit is contained in:
Aleksey Midenkov
2022-08-31 11:55:04 +03:00
parent 32d88faec5
commit d145dda9c7
2 changed files with 14 additions and 9 deletions

View File

@@ -257,7 +257,7 @@ struct rename_param
static int
rename_check_preconditions(THD *thd, rename_param *param,
TABLE_LIST *ren_table,
Table_name *ren_table,
const LEX_CSTRING *new_db,
const LEX_CSTRING *new_table_name,
const LEX_CSTRING *new_table_alias,
@@ -333,7 +333,7 @@ rename_check_preconditions(THD *thd, rename_param *param,
static bool
rename_table_and_triggers(THD *thd, rename_param *param,
DDL_LOG_STATE *ddl_log_state,
TABLE_LIST *ren_table, const LEX_CSTRING *new_db,
Table_name *ren_table, const LEX_CSTRING *new_db,
bool skip_error, bool *force_if_exists)
{
int rc= 1;