diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-02-01 13:43:19 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-02 20:57:46 +0100 |
commit | 80ce0c1c9c234dc53b963659690a1a8368b52124 (patch) | |
tree | 780f5ec1acf50505e6a115cf2005c710429d8d6f /sql/handler.h | |
parent | 06c16904459db6b46518e2f4ac6e21327d336cfd (diff) | |
download | mariadb-git-80ce0c1c9c234dc53b963659690a1a8368b52124.tar.gz |
cleanup: ha_checktype()
* error reporting was never needed
* avoid useless transformaton hton to db_type to hton
* in many cases the engine was guaranteed to exist, add asserts
* use ha_default_handlerton() instead of ha_checktype(DB_TYPE_DEFAULT)
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/handler.h b/sql/handler.h index aff7bf42c27..5ef92088df5 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -4061,9 +4061,13 @@ plugin_ref ha_lock_engine(THD *thd, const handlerton *hton); handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type); handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc, handlerton *db_type); -handlerton *ha_checktype(THD *thd, enum legacy_db_type database_type, - bool no_substitute, bool report_error); +handlerton *ha_checktype(THD *thd, handlerton *hton, bool no_substitute); +static inline handlerton *ha_checktype(THD *thd, enum legacy_db_type type, + bool no_substitute = 0) +{ + return ha_checktype(thd, ha_resolve_by_legacy_type(thd, type), no_substitute); +} static inline enum legacy_db_type ha_legacy_type(const handlerton *db_type) { |