summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bindar <robert@mariadb.org>2019-04-24 09:00:59 +0300
committerRobert Bindar <robert@mariadb.org>2019-04-30 12:08:57 +0300
commitb6cf10eb7353df00c73921f5ed6dd2a6519252a4 (patch)
tree608505c00d3cc7594dd0862f54d0179508969805
parentd1a43973ef2bb6f8e9de2196cbbfdd682d1c9139 (diff)
downloadmariadb-git-bb-10.4-robert-build.tar.gz
MDEV-17709 Remove handlerton::statebb-10.4-robert-build
-rw-r--r--sql/ha_partition.cc1
-rw-r--r--sql/ha_sequence.cc1
-rw-r--r--sql/handler.cc204
-rw-r--r--sql/handler.h12
-rw-r--r--sql/log.cc2
-rw-r--r--sql/sql_show.cc7
-rw-r--r--sql/sql_tablespace.cc2
-rw-r--r--storage/archive/ha_archive.cc1
-rw-r--r--storage/blackhole/ha_blackhole.cc1
-rw-r--r--storage/cassandra/ha_cassandra.cc1
-rw-r--r--storage/connect/ha_connect.cc1
-rw-r--r--storage/csv/ha_tina.cc1
-rw-r--r--storage/example/ha_example.cc1
-rw-r--r--storage/federated/ha_federated.cc1
-rw-r--r--storage/federatedx/ha_federatedx.cc1
-rw-r--r--storage/heap/ha_heap.cc1
-rw-r--r--storage/innobase/handler/ha_innodb.cc1
-rw-r--r--storage/maria/ha_maria.cc1
-rw-r--r--storage/mroonga/ha_mroonga.cpp1
-rw-r--r--storage/myisam/ha_myisam.cc1
-rw-r--r--storage/oqgraph/ha_oqgraph.cc1
-rw-r--r--storage/perfschema/ha_perfschema.cc1
-rw-r--r--storage/rocksdb/ha_rocksdb.cc1
-rw-r--r--storage/sphinx/ha_sphinx.cc1
-rw-r--r--storage/spider/spd_table.cc1
-rw-r--r--storage/tokudb/hatoku_hton.cc1
26 files changed, 105 insertions, 143 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 9dcd57a5f82..cc0d3c85475 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -125,7 +125,6 @@ static int partition_initialize(void *p)
handlerton *partition_hton;
partition_hton= (handlerton *)p;
- partition_hton->state= SHOW_OPTION_YES;
partition_hton->db_type= DB_TYPE_PARTITION_DB;
partition_hton->create= partition_create_handler;
partition_hton->partition_flags= partition_flags;
diff --git a/sql/ha_sequence.cc b/sql/ha_sequence.cc
index 65bb0daf8cf..13cfc6994fc 100644
--- a/sql/ha_sequence.cc
+++ b/sql/ha_sequence.cc
@@ -413,7 +413,6 @@ static int sequence_initialize(void *p)
handlerton *local_sequence_hton= (handlerton *)p;
DBUG_ENTER("sequence_initialize");
- local_sequence_hton->state= SHOW_OPTION_YES;
local_sequence_hton->db_type= DB_TYPE_SEQUENCE;
local_sequence_hton->create= sequence_create_handler;
local_sequence_hton->panic= sequence_end;
diff --git a/sql/handler.cc b/sql/handler.cc
index 130ddfd56eb..a18a4ad3e74 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -271,7 +271,7 @@ handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc,
DBUG_ENTER("get_new_handler");
DBUG_PRINT("enter", ("alloc: %p", alloc));
- if (db_type && db_type->state == SHOW_OPTION_YES && db_type->create)
+ if (db_type && db_type->create && ha_storage_engine_is_enabled(db_type))
{
if ((file= db_type->create(db_type, share, alloc)))
file->init();
@@ -456,15 +456,9 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
if (!hton)
goto end;
- switch (hton->state) {
- case SHOW_OPTION_NO:
- case SHOW_OPTION_DISABLED:
- break;
- case SHOW_OPTION_YES:
- if (installed_htons[hton->db_type] == hton)
- installed_htons[hton->db_type]= NULL;
- break;
- };
+ if (ha_storage_engine_is_enabled(hton) &&
+ installed_htons[hton->db_type] == hton)
+ installed_htons[hton->db_type]= NULL;
if (hton->panic)
hton->panic(hton, HA_PANIC_CLOSE);
@@ -505,6 +499,16 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
DBUG_RETURN(0);
}
+bool ha_storage_engine_is_enabled(const handlerton *db_type)
+{
+ if (ha_legacy_type(db_type) == DB_TYPE_BINLOG)
+ return WSREP_ON || opt_bin_log;
+
+ if (!(db_type && db_type->create))
+ return FALSE;
+
+ return TRUE;
+}
int ha_initialize_handlerton(st_plugin_int *plugin)
{
@@ -531,7 +535,7 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
if (plugin->plugin->init && plugin->plugin->init(hton))
{
sql_print_error("Plugin '%s' init function returned error.",
- plugin->name.str);
+ plugin->name.str);
goto err;
}
@@ -550,90 +554,81 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
hton->discover_table_existence= full_discover_for_existence;
}
- switch (hton->state) {
- case SHOW_OPTION_NO:
- break;
- case SHOW_OPTION_YES:
- {
- uint tmp;
- ulong fslot;
-
- DBUG_EXECUTE_IF("unstable_db_type", {
- static int i= (int) DB_TYPE_FIRST_DYNAMIC;
- hton->db_type= (enum legacy_db_type)++i;
- });
-
- /* now check the db_type for conflict */
- if (hton->db_type <= DB_TYPE_UNKNOWN ||
- hton->db_type >= DB_TYPE_DEFAULT ||
- installed_htons[hton->db_type])
- {
- int idx= (int) DB_TYPE_FIRST_DYNAMIC;
+ if (ha_storage_engine_is_enabled(hton))
+ {
+ uint tmp;
+ ulong fslot;
- while (idx < (int) DB_TYPE_DEFAULT && installed_htons[idx])
- idx++;
+ DBUG_EXECUTE_IF("unstable_db_type", {
+ static int i= (int) DB_TYPE_FIRST_DYNAMIC;
+ hton->db_type= (enum legacy_db_type)++i;
+ });
- if (idx == (int) DB_TYPE_DEFAULT)
- {
- sql_print_warning("Too many storage engines!");
- goto err_deinit;
- }
- if (hton->db_type != DB_TYPE_UNKNOWN)
- sql_print_warning("Storage engine '%s' has conflicting typecode. "
- "Assigning value %d.", plugin->plugin->name, idx);
- hton->db_type= (enum legacy_db_type) idx;
- }
+ /* now check the db_type for conflict */
+ if (hton->db_type <= DB_TYPE_UNKNOWN ||
+ hton->db_type >= DB_TYPE_DEFAULT ||
+ installed_htons[hton->db_type])
+ {
+ int idx= (int) DB_TYPE_FIRST_DYNAMIC;
- /*
- In case a plugin is uninstalled and re-installed later, it should
- reuse an array slot. Otherwise the number of uninstall/install
- cycles would be limited. So look for a free slot.
- */
- DBUG_PRINT("plugin", ("total_ha: %lu", total_ha));
- for (fslot= 0; fslot < total_ha; fslot++)
+ while (idx < (int) DB_TYPE_DEFAULT && installed_htons[idx])
+ idx++;
+
+ if (idx == (int) DB_TYPE_DEFAULT)
{
- if (!hton2plugin[fslot])
- break;
+ sql_print_warning("Too many storage engines!");
+ goto err_deinit;
}
- if (fslot < total_ha)
- hton->slot= fslot;
- else
+ if (hton->db_type != DB_TYPE_UNKNOWN)
+ sql_print_warning("Storage engine '%s' has conflicting typecode. "
+ "Assigning value %d.", plugin->plugin->name, idx);
+ hton->db_type= (enum legacy_db_type) idx;
+ }
+
+ /*
+ In case a plugin is uninstalled and re-installed later, it should
+ reuse an array slot. Otherwise the number of uninstall/install
+ cycles would be limited. So look for a free slot.
+ */
+ DBUG_PRINT("plugin", ("total_ha: %lu", total_ha));
+ for (fslot= 0; fslot < total_ha; fslot++)
+ {
+ if (!hton2plugin[fslot])
+ break;
+ }
+ if (fslot < total_ha)
+ hton->slot= fslot;
+ else
+ {
+ if (total_ha >= MAX_HA)
{
- if (total_ha >= MAX_HA)
- {
- sql_print_error("Too many plugins loaded. Limit is %lu. "
- "Failed on '%s'", (ulong) MAX_HA, plugin->name.str);
- goto err_deinit;
- }
- hton->slot= total_ha++;
+ sql_print_error("Too many plugins loaded. Limit is %lu. "
+ "Failed on '%s'", (ulong) MAX_HA, plugin->name.str);
+ goto err_deinit;
}
- installed_htons[hton->db_type]= hton;
- tmp= hton->savepoint_offset;
- hton->savepoint_offset= savepoint_alloc_size;
- savepoint_alloc_size+= tmp;
- hton2plugin[hton->slot]=plugin;
- if (hton->prepare)
+ hton->slot= total_ha++;
+ }
+ installed_htons[hton->db_type]= hton;
+ tmp= hton->savepoint_offset;
+ hton->savepoint_offset= savepoint_alloc_size;
+ savepoint_alloc_size+= tmp;
+ hton2plugin[hton->slot]=plugin;
+ if (hton->prepare)
+ {
+ total_ha_2pc++;
+ if (tc_log && tc_log != get_tc_log_implementation())
{
- total_ha_2pc++;
- if (tc_log && tc_log != get_tc_log_implementation())
- {
- total_ha_2pc--;
- hton->prepare= 0;
- push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
- ER_UNKNOWN_ERROR,
- "Cannot enable tc-log at run-time. "
- "XA features of %s are disabled",
- plugin->name.str);
- }
+ total_ha_2pc--;
+ hton->prepare= 0;
+ push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_UNKNOWN_ERROR,
+ "Cannot enable tc-log at run-time. "
+ "XA features of %s are disabled",
+ plugin->name.str);
}
- break;
}
- /* fall through */
- default:
- hton->state= SHOW_OPTION_DISABLED;
- break;
}
-
+
/*
This is entirely for legacy. We will create a new "disk based" hton and a
"memory" hton which will be configurable longterm. We should be able to
@@ -668,10 +663,10 @@ err_deinit:
*/
if (plugin->plugin->deinit)
(void) plugin->plugin->deinit(NULL);
-
+
err:
#ifdef DBUG_ASSERT_EXISTS
- if (hton->prepare && hton->state == SHOW_OPTION_YES)
+ if (hton->prepare && ha_storage_engine_is_enabled(hton))
failed_ha_2pc++;
#endif
my_free(hton);
@@ -716,7 +711,7 @@ static my_bool dropdb_handlerton(THD *unused1, plugin_ref plugin,
void *path)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->drop_database)
+ if (ha_storage_engine_is_enabled(hton) && hton->drop_database)
hton->drop_database(hton, (char *)path);
return FALSE;
}
@@ -732,7 +727,7 @@ static my_bool checkpoint_state_handlerton(THD *unused1, plugin_ref plugin,
void *disable)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->checkpoint_state)
+ if (ha_storage_engine_is_enabled(hton) && hton->checkpoint_state)
hton->checkpoint_state(hton, (int) *(bool*) disable);
return FALSE;
}
@@ -754,7 +749,7 @@ static my_bool commit_checkpoint_request_handlerton(THD *unused1, plugin_ref plu
{
st_commit_checkpoint_request *st= (st_commit_checkpoint_request *)data;
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->commit_checkpoint_request)
+ if (ha_storage_engine_is_enabled(hton) && hton->commit_checkpoint_request)
{
void *cookie= st->cookie;
if (st->pre_hook)
@@ -790,7 +785,7 @@ static my_bool closecon_handlerton(THD *thd, plugin_ref plugin,
there's no need to rollback here as all transactions must
be rolled back already
*/
- if (hton->state == SHOW_OPTION_YES && thd_get_ha_data(thd, hton))
+ if (ha_storage_engine_is_enabled(hton) && thd_get_ha_data(thd, hton))
{
if (hton->close_connection)
hton->close_connection(hton, thd);
@@ -816,7 +811,7 @@ static my_bool kill_handlerton(THD *thd, plugin_ref plugin,
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->kill_query &&
+ if (ha_storage_engine_is_enabled(hton) && hton->kill_query &&
thd_get_ha_data(thd, hton))
hton->kill_query(hton, thd, *(enum thd_kill_levels *) level);
return FALSE;
@@ -838,7 +833,7 @@ static my_bool plugin_prepare_for_backup(THD *unused1, plugin_ref plugin,
void *not_used)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->prepare_for_backup)
+ if (ha_storage_engine_is_enabled(hton) && hton->prepare_for_backup)
hton->prepare_for_backup();
return FALSE;
}
@@ -854,7 +849,7 @@ static my_bool plugin_end_backup(THD *unused1, plugin_ref plugin,
void *not_used)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->end_backup)
+ if (ha_storage_engine_is_enabled(hton) && hton->end_backup)
hton->end_backup();
return FALSE;
}
@@ -1932,7 +1927,7 @@ static my_bool xacommit_handlerton(THD *unused1, plugin_ref plugin,
void *arg)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->recover)
+ if (ha_storage_engine_is_enabled(hton) && hton->recover)
{
hton->commit_by_xid(hton, ((struct xahton_st *)arg)->xid);
((struct xahton_st *)arg)->result= 0;
@@ -1944,7 +1939,7 @@ static my_bool xarollback_handlerton(THD *unused1, plugin_ref plugin,
void *arg)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->recover)
+ if (ha_storage_engine_is_enabled(hton) && hton->recover)
{
hton->rollback_by_xid(hton, ((struct xahton_st *)arg)->xid);
((struct xahton_st *)arg)->result= 0;
@@ -2075,7 +2070,7 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
struct xarecover_st *info= (struct xarecover_st *) arg;
int got;
- if (hton->state == SHOW_OPTION_YES && hton->recover)
+ if (ha_storage_engine_is_enabled(hton) && hton->recover)
{
while ((got= hton->recover(hton, info->list, info->len)) > 0 )
{
@@ -2420,8 +2415,7 @@ static my_bool snapshot_handlerton(THD *thd, plugin_ref plugin,
void *arg)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES &&
- hton->start_consistent_snapshot)
+ if (ha_storage_engine_is_enabled(hton) && hton->start_consistent_snapshot)
{
if (hton->start_consistent_snapshot(hton, thd))
return TRUE;
@@ -2467,7 +2461,7 @@ static my_bool flush_handlerton(THD *thd, plugin_ref plugin,
void *arg)
{
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->flush_logs &&
+ if (ha_storage_engine_is_enabled(hton) && hton->flush_logs &&
hton->flush_logs(hton))
return TRUE;
return FALSE;
@@ -2484,7 +2478,7 @@ bool ha_flush_logs(handlerton *db_type)
}
else
{
- if (db_type->state != SHOW_OPTION_YES ||
+ if (ha_storage_engine_is_enabled(db_type) ||
(db_type->flush_logs && db_type->flush_logs(db_type)))
return TRUE;
}
@@ -5221,7 +5215,7 @@ static my_bool discover_handlerton(THD *thd, plugin_ref plugin,
{
TABLE_SHARE *share= (TABLE_SHARE *)arg;
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->discover_table)
+ if (ha_storage_engine_is_enabled(hton) && hton->discover_table)
{
share->db_plugin= plugin;
int error= hton->discover_table(hton, thd, share);
@@ -5297,7 +5291,7 @@ static my_bool discover_existence(THD *thd, plugin_ref plugin,
{
st_discover_existence_args *args= (st_discover_existence_args*)arg;
handlerton *ht= plugin_hton(plugin);
- if (ht->state != SHOW_OPTION_YES || !ht->discover_table_existence)
+ if (!ha_storage_engine_is_enabled(ht) || !ht->discover_table_existence)
return args->frm_exists;
args->hton= ht;
@@ -5587,7 +5581,7 @@ static my_bool discover_names(THD *thd, plugin_ref plugin,
st_discover_names_args *args= (st_discover_names_args *)arg;
handlerton *ht= plugin_hton(plugin);
- if (ht->state == SHOW_OPTION_YES && ht->discover_table_names)
+ if (ha_storage_engine_is_enabled(ht) && ht->discover_table_names)
{
size_t old_elements= args->result->tables->elements();
if (ht->discover_table_names(ht, args->db, args->dirp, args->result))
@@ -5986,7 +5980,7 @@ static my_bool showstat_handlerton(THD *thd, plugin_ref plugin,
{
enum ha_stat_type stat= *(enum ha_stat_type *) arg;
handlerton *hton= plugin_hton(plugin);
- if (hton->state == SHOW_OPTION_YES && hton->show_status &&
+ if (ha_storage_engine_is_enabled(hton) && hton->show_status &&
hton->show_status(hton, thd, stat_print, stat))
return TRUE;
return FALSE;
@@ -6018,7 +6012,7 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
}
else
{
- if (db_type->state != SHOW_OPTION_YES)
+ if (!ha_storage_engine_is_enabled(db_type))
{
const LEX_CSTRING *name= hton_name(db_type);
result= stat_print(thd, name->str, name->length,
diff --git a/sql/handler.h b/sql/handler.h
index fb6862e4ce1..5f70bd7f823 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1239,11 +1239,6 @@ typedef struct st_order ORDER;
struct handlerton
{
/*
- Historical marker for if the engine is available of not
- */
- SHOW_COMP_OPTION state;
-
- /*
Historical number used for frm file to determine the correct
storage engine. This is going away and new engines will just use
"name" for this.
@@ -4856,12 +4851,6 @@ static inline bool ha_check_storage_engine_flag(const handlerton *db_type, uint3
return db_type == NULL ? FALSE : MY_TEST(db_type->flags & flag);
}
-static inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
-{
- return (db_type && db_type->create) ?
- (db_type->state == SHOW_OPTION_YES) : FALSE;
-}
-
#define view_pseudo_hton ((handlerton *)1)
/* basic stuff */
@@ -4886,6 +4875,7 @@ int ha_delete_table(THD *thd, handlerton *db_type, const char *path,
const LEX_CSTRING *db, const LEX_CSTRING *alias, bool generate_warning);
void ha_prepare_for_backup();
void ha_end_backup();
+bool ha_storage_engine_is_enabled(const handlerton *db_type);
/* statistics and info */
bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat);
diff --git a/sql/log.cc b/sql/log.cc
index 9f724534e6e..c1e5ef9210d 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1680,8 +1680,6 @@ binlog_trans_log_truncate(THD *thd, my_off_t pos)
int binlog_init(void *p)
{
binlog_hton= (handlerton *)p;
- binlog_hton->state= (WSREP_ON || opt_bin_log) ? SHOW_OPTION_YES
- : SHOW_OPTION_NO;
binlog_hton->db_type=DB_TYPE_BINLOG;
binlog_hton->savepoint_offset= sizeof(my_off_t);
binlog_hton->close_connection= binlog_close_connection;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 4d904199efc..86d29518875 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -6133,11 +6133,12 @@ static my_bool iter_schema_engines(THD *thd, plugin_ref plugin,
LEX_CSTRING yesno[2]= {{ STRING_WITH_LEN("NO") },
{ STRING_WITH_LEN("YES") }};
LEX_CSTRING *tmp;
- const char *option_name= show_comp_option_name[(int) hton->state];
+ bool plugin_enabled= ha_storage_engine_is_enabled(hton);
+ const char *option_name= yesno[plugin_enabled].str;
restore_record(table, s->default_values);
table->field[0]->store(name->str, name->length, scs);
- if (hton->state == SHOW_OPTION_YES && default_type == hton)
+ if (plugin_enabled && default_type == hton)
option_name= "DEFAULT";
table->field[1]->store(option_name, strlen(option_name), scs);
table->field[2]->store(plugin_decl(plugin)->descr,
@@ -8925,7 +8926,7 @@ static my_bool run_hton_fill_schema_table(THD *thd, plugin_ref plugin,
struct run_hton_fill_schema_table_args *args=
(run_hton_fill_schema_table_args *) arg;
handlerton *hton= plugin_hton(plugin);
- if (hton->fill_is_table && hton->state == SHOW_OPTION_YES)
+ if (hton->fill_is_table && ha_storage_engine_is_enabled(hton))
hton->fill_is_table(hton, thd, args->tables, args->cond,
get_schema_table_idx(args->tables->schema_table));
return false;
diff --git a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc
index d97d50912e6..091e808ba4a 100644
--- a/sql/sql_tablespace.cc
+++ b/sql/sql_tablespace.cc
@@ -32,7 +32,7 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info)
If the user haven't defined an engine, this will fallback to using the
default storage engine.
*/
- if (hton == NULL || hton->state != SHOW_OPTION_YES)
+ if (hton == NULL || !ha_storage_engine_is_enabled(hton))
{
hton= ha_default_handlerton(thd);
if (ts_info->storage_engine != 0)
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 5cc878388ca..c72641b701c 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -215,7 +215,6 @@ int archive_db_init(void *p)
#endif
archive_hton= (handlerton *)p;
- archive_hton->state= SHOW_OPTION_YES;
archive_hton->db_type= DB_TYPE_ARCHIVE_DB;
archive_hton->create= archive_create_handler;
archive_hton->flags= HTON_NO_FLAGS;
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc
index ed9b03dc82b..1b9f2c20d7c 100644
--- a/storage/blackhole/ha_blackhole.cc
+++ b/storage/blackhole/ha_blackhole.cc
@@ -380,7 +380,6 @@ static int blackhole_init(void *p)
#endif
blackhole_hton= (handlerton *)p;
- blackhole_hton->state= SHOW_OPTION_YES;
blackhole_hton->db_type= DB_TYPE_BLACKHOLE_DB;
blackhole_hton->create= blackhole_create_handler;
blackhole_hton->flags= HTON_CAN_RECREATE;
diff --git a/storage/cassandra/ha_cassandra.cc b/storage/cassandra/ha_cassandra.cc
index 0104fc06420..04acd465886 100644
--- a/storage/cassandra/ha_cassandra.cc
+++ b/storage/cassandra/ha_cassandra.cc
@@ -245,7 +245,6 @@ static int cassandra_init_func(void *p)
(void) my_hash_init(&cassandra_open_tables,system_charset_info,32,0,0,
(my_hash_get_key) cassandra_get_key,0,0);
- cassandra_hton->state= SHOW_OPTION_YES;
cassandra_hton->create= cassandra_create_handler;
/*
Don't specify HTON_CAN_RECREATE in flags. re-create is used by TRUNCATE
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index d1b5e728cef..c16688d911f 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -758,7 +758,6 @@ static int connect_init_func(void *p)
init_connect_psi_keys();
connect_hton= (handlerton *)p;
- connect_hton->state= SHOW_OPTION_YES;
connect_hton->create= connect_create_handler;
connect_hton->flags= HTON_TEMPORARY_NOT_SUPPORTED;
connect_hton->table_options= connect_table_option_list;
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index f69dd7989a2..bb56e602f2c 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -168,7 +168,6 @@ static int tina_init_func(void *p)
mysql_mutex_init(csv_key_mutex_tina, &tina_mutex, MY_MUTEX_INIT_FAST);
(void) my_hash_init(&tina_open_tables,system_charset_info,32,0,0,
(my_hash_get_key) tina_get_key,0,0);
- tina_hton->state= SHOW_OPTION_YES;
tina_hton->db_type= DB_TYPE_CSV_DB;
tina_hton->create= tina_create_handler;
tina_hton->flags= (HTON_CAN_RECREATE | HTON_SUPPORT_LOG_TABLES |
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index c83139b786f..e5e397b8c8f 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -257,7 +257,6 @@ static int example_init_func(void *p)
#endif
example_hton= (handlerton *)p;
- example_hton->state= SHOW_OPTION_YES;
example_hton->create= example_create_handler;
example_hton->flags= HTON_CAN_RECREATE;
example_hton->table_options= example_table_option_list;
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 4aed06885e5..18acf144a41 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -480,7 +480,6 @@ int federated_db_init(void *p)
#endif /* HAVE_PSI_INTERFACE */
handlerton *federated_hton= (handlerton *)p;
- federated_hton->state= SHOW_OPTION_YES;
federated_hton->db_type= DB_TYPE_FEDERATED_DB;
federated_hton->commit= federated_commit;
federated_hton->rollback= federated_rollback;
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index b0a08a0d49a..2047a277d71 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -426,7 +426,6 @@ int federatedx_db_init(void *p)
DBUG_ENTER("federatedx_db_init");
init_federated_psi_keys();
federatedx_hton= (handlerton *)p;
- federatedx_hton->state= SHOW_OPTION_YES;
/* Needed to work with old .frm files */
federatedx_hton->db_type= DB_TYPE_FEDERATED_DB;
federatedx_hton->savepoint_offset= sizeof(ulong);
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index dc7b225f592..a47af5c80bd 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -49,7 +49,6 @@ int heap_init(void *p)
#endif
heap_hton= (handlerton *)p;
- heap_hton->state= SHOW_OPTION_YES;
heap_hton->db_type= DB_TYPE_HEAP;
heap_hton->create= heap_create_handler;
heap_hton->panic= heap_panic;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index e9a5d350f8b..0baa58b4f0e 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4145,7 +4145,6 @@ static int innodb_init(void* p)
handlerton* innobase_hton= static_cast<handlerton*>(p);
innodb_hton_ptr = innobase_hton;
- innobase_hton->state = SHOW_OPTION_YES;
innobase_hton->db_type = DB_TYPE_INNODB;
innobase_hton->savepoint_offset = sizeof(trx_named_savept_t);
innobase_hton->close_connection = innobase_close_connection;
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 30f8724aebd..ea8b38b6c5b 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -3653,7 +3653,6 @@ static int ha_maria_init(void *p)
#endif
maria_hton= (handlerton *)p;
- maria_hton->state= SHOW_OPTION_YES;
maria_hton->db_type= DB_TYPE_ARIA;
maria_hton->create= maria_create_handler;
maria_hton->panic= maria_hton_panic;
diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp
index 0f153e200ef..4ffc265c955 100644
--- a/storage/mroonga/ha_mroonga.cpp
+++ b/storage/mroonga/ha_mroonga.cpp
@@ -1807,7 +1807,6 @@ static int mrn_init(void *p)
// init handlerton
grn_ctx *ctx = NULL;
handlerton *hton = static_cast<handlerton *>(p);
- hton->state = SHOW_OPTION_YES;
hton->create = mrn_handler_create;
hton->flags = HTON_NO_FLAGS;
#ifndef MRN_SUPPORT_PARTITION
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 2db068acbcb..896ae74105d 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -2498,7 +2498,6 @@ static int myisam_init(void *p)
myisam_block_size=(uint) 1 << my_bit_log2(opt_myisam_block_size);
hton= (handlerton *)p;
- hton->state= SHOW_OPTION_YES;
hton->db_type= DB_TYPE_MYISAM;
hton->create= myisam_create_handler;
hton->panic= myisam_panic;
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc
index fcb18962b5b..617dd110e7d 100644
--- a/storage/oqgraph/ha_oqgraph.cc
+++ b/storage/oqgraph/ha_oqgraph.cc
@@ -179,7 +179,6 @@ static int oqgraph_init(void *p)
handlerton *hton= (handlerton *)p;
DBUG_PRINT( "oq-debug", ("oqgraph_init"));
- hton->state= SHOW_OPTION_YES;
hton->db_type= DB_TYPE_AUTOASSIGN;
hton->create= oqgraph_create_handler;
hton->flags= HTON_ALTER_NOT_SUPPORTED;
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 78bd2d34c32..a40b959bac0 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -83,7 +83,6 @@ static int pfs_init_func(void *p)
pfs_hton= reinterpret_cast<handlerton *> (p);
- pfs_hton->state= SHOW_OPTION_YES;
pfs_hton->create= pfs_create_handler;
pfs_hton->show_status= pfs_show_status;
pfs_hton->flags= HTON_ALTER_NOT_SUPPORTED |
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 8ebd1f9de0f..b6c5a04cb68 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -4848,7 +4848,6 @@ static int rocksdb_init_func(void *const p) {
&rdb_block_cache_resize_mutex, MY_MUTEX_INIT_FAST);
Rdb_transaction::init_mutex();
- rocksdb_hton->state = SHOW_OPTION_YES;
rocksdb_hton->create = rocksdb_create_handler;
rocksdb_hton->close_connection = rocksdb_close_connection;
diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
index 86332a741c6..b20e754a62f 100644
--- a/storage/sphinx/ha_sphinx.cc
+++ b/storage/sphinx/ha_sphinx.cc
@@ -742,7 +742,6 @@ static int sphinx_init_func ( void * p )
#if MYSQL_VERSION_ID > 50100
handlerton * hton = (handlerton*) p;
- hton->state = SHOW_OPTION_YES;
hton->db_type = DB_TYPE_AUTOASSIGN;
hton->create = sphinx_create_handler;
hton->close_connection = sphinx_close_connection;
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index d17e76e5ec6..573fd002183 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -6870,7 +6870,6 @@ int spider_db_init(
DBUG_ENTER("spider_db_init");
spider_hton_ptr = spider_hton;
- spider_hton->state = SHOW_OPTION_YES;
spider_hton->flags = HTON_NO_FLAGS;
#ifdef HTON_CAN_READ_CONNECT_STRING_IN_PARTITION
spider_hton->flags |= HTON_CAN_READ_CONNECT_STRING_IN_PARTITION;
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index 81355ea20ff..a52f64dc807 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -348,7 +348,6 @@ static int tokudb_init_func(void *p) {
TOKUDB_SHARE::static_init();
tokudb::background::initialize();
- tokudb_hton->state = SHOW_OPTION_YES;
// tokudb_hton->flags= HTON_CAN_RECREATE; // QQQ this came from skeleton
tokudb_hton->flags = HTON_CLOSE_CURSORS_AT_COMMIT | HTON_SUPPORTS_EXTENDED_KEYS;