diff options
author | unknown <monty@mishka.local> | 2005-04-16 04:35:54 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-04-16 04:35:54 +0300 |
commit | 2be63528bc0f7d524df4660cea4fcc002604c42e (patch) | |
tree | 4432c91a9b8ee8482b369f2a066a5e9a9d87b399 /sql/handler.cc | |
parent | 88538066ba1cbf80da5f88b0d4188f8b875127c9 (diff) | |
parent | 9b224e9180d26aa5b7e087537255c60c5c061ad3 (diff) | |
download | mariadb-git-2be63528bc0f7d524df4660cea4fcc002604c42e.tar.gz |
Merge with 4.1
scripts/mysql_create_system_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/set_var.cc:
Auto merged
support-files/mysql.server.sh:
Auto merged
sql/ha_ndbcluster.cc:
Merge
sql/handler.cc:
Merge
sql/handler.h:
Merge
sql/mysqld.cc:
Merge
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 8315ec6bb1a..14b8974ece9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -149,18 +149,27 @@ const char *ha_get_storage_engine(enum db_type db_type) return "none"; } - /* Use other database handler if databasehandler is not incompiled */ -enum db_type ha_checktype(enum db_type database_type) +my_bool ha_storage_engine_is_enabled(enum db_type database_type) { show_table_type_st *types; - THD *thd= current_thd; for (types= sys_table_types; types->type; types++) { - if ((database_type == types->db_type) && + if ((database_type == types->db_type) && (*types->value == SHOW_OPTION_YES)) - return database_type; + return TRUE; } + return FALSE; +} + + + /* Use other database handler if databasehandler is not incompiled */ + +enum db_type ha_checktype(enum db_type database_type) +{ + THD *thd; + if (ha_storage_engine_is_enabled(database_type)) + return database_type; switch (database_type) { #ifndef NO_HASH @@ -173,6 +182,7 @@ enum db_type ha_checktype(enum db_type database_type) break; } + thd= current_thd; return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ? (enum db_type) thd->variables.table_type : (enum db_type) global_system_variables.table_type != |