Skip to content

Commit cc5b399

Browse files
committed
remove HTON_FLUSH_AFTER_RENAME (BDB-ism, unused for years)
1 parent fb8818c commit cc5b399

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

sql/handler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,6 @@ handlerton *ha_default_tmp_handlerton(THD *thd);
13691369
#define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter
13701370
#define HTON_CAN_RECREATE (1 << 2) //Delete all is used for truncate
13711371
#define HTON_HIDDEN (1 << 3) //Engine does not appear in lists
1372-
#define HTON_FLUSH_AFTER_RENAME (1 << 4)
13731372
#define HTON_NOT_USER_SELECTABLE (1 << 5)
13741373
#define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported
13751374
#define HTON_SUPPORT_LOG_TABLES (1 << 7) //Engine supports log tables

sql/sql_table.cc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9073,24 +9073,6 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
90739073
if (write_bin_log(thd, true, thd->query(), thd->query_length()))
90749074
DBUG_RETURN(true);
90759075

9076-
if (ha_check_storage_engine_flag(old_db_type, HTON_FLUSH_AFTER_RENAME))
9077-
{
9078-
/*
9079-
For the alter table to be properly flushed to the logs, we
9080-
have to open the new table. If not, we get a problem on server
9081-
shutdown. But we do not need to attach MERGE children.
9082-
*/
9083-
TABLE *t_table;
9084-
t_table= open_table_uncached(thd, new_db_type, alter_ctx.get_new_path(),
9085-
alter_ctx.new_db, alter_ctx.new_name,
9086-
false, true);
9087-
if (t_table)
9088-
intern_close_table(t_table);
9089-
else
9090-
sql_print_warning("Could not open table %s.%s after rename\n",
9091-
alter_ctx.new_db, alter_ctx.table_name);
9092-
ha_flush_logs(old_db_type);
9093-
}
90949076
table_list->table= NULL; // For query cache
90959077
query_cache_invalidate3(thd, table_list, false);
90969078

0 commit comments

Comments
 (0)