1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-03 05:41:09 +03:00

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
This commit is contained in:
tulin@dl145b.mysql.com
2005-06-18 09:21:50 +02:00
12 changed files with 95 additions and 38 deletions

View File

@@ -165,12 +165,22 @@ my_bool ha_storage_engine_is_enabled(enum db_type database_type)
/* Use other database handler if databasehandler is not incompiled */
enum db_type ha_checktype(enum db_type database_type)
enum db_type ha_checktype(THD *thd, enum db_type database_type,
bool no_substitute, bool report_error)
{
THD *thd;
if (ha_storage_engine_is_enabled(database_type))
return database_type;
if (no_substitute)
{
if (report_error)
{
const char *engine_name= ha_get_storage_engine(database_type);
my_error(ER_FEATURE_DISABLED,MYF(0),engine_name,engine_name);
}
return DB_TYPE_UNKNOWN;
}
switch (database_type) {
#ifndef NO_HASH
case DB_TYPE_HASH:
@@ -182,7 +192,6 @@ 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 !=