mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-25292 ha_table_exists() cleanup and improvement
Removed default values for arguments, added flags argument to specify filename flags (FN_TO_IS_TMP, FN_FROM_IS_TMP).
This commit is contained in:
@ -4427,8 +4427,9 @@ int create_table_impl(THD *thd,
|
||||
|
||||
handlerton *db_type;
|
||||
if (!internal_tmp_table &&
|
||||
ha_table_exists(thd, &db, &table_name,
|
||||
&create_info->org_tabledef_version, NULL, &db_type))
|
||||
ha_table_exists(thd, &orig_db, &orig_table_name,
|
||||
&create_info->org_tabledef_version,
|
||||
NULL, &db_type, NULL, 0))
|
||||
{
|
||||
if (ha_check_if_updates_are_ignored(thd, db_type, "CREATE"))
|
||||
{
|
||||
@ -10080,7 +10081,8 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
|
||||
on the name, now we can safely try to find out for sure.
|
||||
*/
|
||||
if (!(alter_info->partition_flags & ALTER_PARTITION_CONVERT_IN) &&
|
||||
ha_table_exists(thd, &alter_ctx.new_db, &alter_ctx.new_name))
|
||||
ha_table_exists(thd, &alter_ctx.new_db, &alter_ctx.new_name,
|
||||
NULL, NULL, NULL, NULL, 0))
|
||||
{
|
||||
/* Table will be closed in do_command() */
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alter_ctx.new_alias.str);
|
||||
|
Reference in New Issue
Block a user