summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h31
1 files changed, 4 insertions, 27 deletions
diff --git a/sql/handler.h b/sql/handler.h
index afee6bb9f8d..83143d9729d 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -177,6 +177,7 @@
so: innodb + bdb + ndb + binlog + myisam + myisammrg + archive +
example + csv + heap + blackhole + federated + 0
(yes, the sum is deliberately inaccurate)
+ TODO remove the limit, use dynarrays
*/
#define MAX_HA 15
@@ -460,6 +461,7 @@ typedef bool (stat_print_fn)(THD *thd, const char *type, uint type_len,
const char *file, uint file_len,
const char *status, uint status_len);
enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, HA_ENGINE_MUTEX };
+extern st_mysql_plugin *hton2plugin[MAX_HA];
/*
handlerton is a singleton structure - one instance per storage engine -
@@ -475,38 +477,15 @@ enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, HA_ENGINE_MUTEX };
struct handlerton
{
/*
- handlerton structure version
- */
- const int interface_version;
-/* last version change: 0x0001 in 5.1.6 */
-#define MYSQL_HANDLERTON_INTERFACE_VERSION 0x0001
-
-
- /*
- storage engine name as it should be printed to a user
- */
- const char *name;
-
- /*
- Historical marker for if the engine is available of not
+ Historical marker for if the engine is available of not
*/
SHOW_COMP_OPTION state;
/*
- A comment used by SHOW to describe an engine.
- */
- const char *comment;
-
- /*
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.
*/
enum legacy_db_type db_type;
- /*
- Method that initizlizes a storage engine
- */
- bool (*init)();
-
/*
each storage engine has it's own memory area (actually a pointer)
in the thd, for storing per-connection information.
@@ -587,8 +566,6 @@ struct handlerton
int (*release_temporary_latches)(THD *thd);
};
-extern const handlerton default_hton;
-
struct show_table_alias_st {
const char *alias;
enum legacy_db_type type;
@@ -1552,7 +1529,7 @@ static inline enum legacy_db_type ha_legacy_type(const handlerton *db_type)
static inline const char *ha_resolve_storage_engine_name(const handlerton *db_type)
{
- return db_type == NULL ? "UNKNOWN" : db_type->name;
+ return db_type == NULL ? "UNKNOWN" : hton2plugin[db_type->slot]->name;
}
static inline bool ha_check_storage_engine_flag(const handlerton *db_type, uint32 flag)