@@ -4629,13 +4629,11 @@ const char* find_fk_supporting_index(Alter_info *alter_info,
4629
4629
problems with duplicate foreign key names while we have two
4630
4630
definitions of the same table.
4631
4631
4632
- @param thd Thread handle.
4633
4632
@param table_def Table object.
4634
4633
@param alter_ctx ALTER TABLE runtime context.
4635
4634
*/
4636
4635
4637
- static void restore_foreign_key_names (THD *thd,
4638
- dd::Table *table_def,
4636
+ static void restore_foreign_key_names (dd::Table *table_def,
4639
4637
const Alter_table_ctx &alter_ctx)
4640
4638
{
4641
4639
// Restore the original name for pre-existing foreign keys
@@ -8739,7 +8737,7 @@ static bool mysql_inplace_alter_table(THD *thd,
8739
8737
table definition. Since we now have only one defintion, the names
8740
8738
can be restored.
8741
8739
*/
8742
- restore_foreign_key_names (thd, altered_table_def, *alter_ctx);
8740
+ restore_foreign_key_names (altered_table_def, *alter_ctx);
8743
8741
8744
8742
if (thd->dd_client ()->update (altered_table_def))
8745
8743
goto cleanup2;
@@ -11941,7 +11939,7 @@ bool mysql_alter_table(THD *thd, const char *new_db, const char *new_name,
11941
11939
goto err_with_mdl;
11942
11940
DBUG_ASSERT (new_table != nullptr );
11943
11941
11944
- restore_foreign_key_names (thd, new_table, alter_ctx);
11942
+ restore_foreign_key_names (new_table, alter_ctx);
11945
11943
if (thd->dd_client ()->update (new_table))
11946
11944
goto err_with_mdl;
11947
11945
0 commit comments