@@ -4427,8 +4427,9 @@ int create_table_impl(THD *thd,
44274427
44284428 handlerton *db_type;
44294429 if (!internal_tmp_table &&
4430- ha_table_exists (thd, &db, &table_name,
4431- &create_info->org_tabledef_version , NULL , &db_type))
4430+ ha_table_exists (thd, &orig_db, &orig_table_name,
4431+ &create_info->org_tabledef_version ,
4432+ NULL , &db_type, NULL , 0 ))
44324433 {
44334434 if (ha_check_if_updates_are_ignored (thd, db_type, " CREATE" ))
44344435 {
@@ -10080,7 +10081,8 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
1008010081 on the name, now we can safely try to find out for sure.
1008110082 */
1008210083 if (!(alter_info->partition_flags & ALTER_PARTITION_CONVERT_IN) &&
10083- ha_table_exists (thd, &alter_ctx.new_db , &alter_ctx.new_name ))
10084+ ha_table_exists (thd, &alter_ctx.new_db , &alter_ctx.new_name ,
10085+ NULL , NULL , NULL , NULL , 0 ))
1008410086 {
1008510087 /* Table will be closed in do_command() */
1008610088 my_error (ER_TABLE_EXISTS_ERROR, MYF (0 ), alter_ctx.new_alias .str );
0 commit comments