From cc5b3998b6767523792f7e4ec8c9a100db2d06ce Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 18 Jun 2014 11:53:42 +0200 Subject: [PATCH] remove HTON_FLUSH_AFTER_RENAME (BDB-ism, unused for years) --- sql/handler.h | 1 - sql/sql_table.cc | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/sql/handler.h b/sql/handler.h index 5cff169b295..1e4fe5557b6 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1369,7 +1369,6 @@ handlerton *ha_default_tmp_handlerton(THD *thd); #define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter #define HTON_CAN_RECREATE (1 << 2) //Delete all is used for truncate #define HTON_HIDDEN (1 << 3) //Engine does not appear in lists -#define HTON_FLUSH_AFTER_RENAME (1 << 4) #define HTON_NOT_USER_SELECTABLE (1 << 5) #define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported #define HTON_SUPPORT_LOG_TABLES (1 << 7) //Engine supports log tables diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 56a3a1861c5..c3410d9c0cd 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -9073,24 +9073,6 @@ end_inplace: if (write_bin_log(thd, true, thd->query(), thd->query_length())) DBUG_RETURN(true); - if (ha_check_storage_engine_flag(old_db_type, HTON_FLUSH_AFTER_RENAME)) - { - /* - For the alter table to be properly flushed to the logs, we - have to open the new table. If not, we get a problem on server - shutdown. But we do not need to attach MERGE children. - */ - TABLE *t_table; - t_table= open_table_uncached(thd, new_db_type, alter_ctx.get_new_path(), - alter_ctx.new_db, alter_ctx.new_name, - false, true); - if (t_table) - intern_close_table(t_table); - else - sql_print_warning("Could not open table %s.%s after rename\n", - alter_ctx.new_db, alter_ctx.table_name); - ha_flush_logs(old_db_type); - } table_list->table= NULL; // For query cache query_cache_invalidate3(thd, table_list, false);