summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorjimw@mysql.com <>2006-01-05 10:27:06 -0800
committerjimw@mysql.com <>2006-01-05 10:27:06 -0800
commit7d551b8a4e4dfb17a564b76f82bca4cb201e58f8 (patch)
tree002dd70d0f9ac7c66e1d35085c148991fd0498ba /sql/handler.cc
parented7c09da369187b08ca4bc7cc868cdc2ca8dce96 (diff)
parent5bb966a9b61eeaac9677cfe09d21fd9bb5435f4c (diff)
downloadmariadb-git-7d551b8a4e4dfb17a564b76f82bca4cb201e58f8.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.0-15185
into mysql.com:/home/jimw/my/mysql-5.0-clean
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc35
1 files changed, 25 insertions, 10 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 4c60f460a23..4b4c446f09b 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -300,39 +300,56 @@ handler *get_new_handler(TABLE *table, MEM_ROOT *alloc, enum db_type db_type)
case DB_TYPE_HASH:
return new (alloc) ha_hash(table);
#endif
+ case DB_TYPE_MRG_MYISAM:
case DB_TYPE_MRG_ISAM:
return new (alloc) ha_myisammrg(table);
#ifdef HAVE_BERKELEY_DB
case DB_TYPE_BERKELEY_DB:
- return new (alloc) ha_berkeley(table);
+ if (have_berkeley_db == SHOW_OPTION_YES)
+ return new (alloc) ha_berkeley(table);
+ return NULL;
#endif
#ifdef HAVE_INNOBASE_DB
case DB_TYPE_INNODB:
- return new (alloc) ha_innobase(table);
+ if (have_innodb == SHOW_OPTION_YES)
+ return new (alloc) ha_innobase(table);
+ return NULL;
#endif
#ifdef HAVE_EXAMPLE_DB
case DB_TYPE_EXAMPLE_DB:
- return new (alloc) ha_example(table);
+ if (have_example_db == SHOW_OPTION_YES)
+ return new (alloc) ha_example(table);
+ return NULL;
#endif
#if defined(HAVE_ARCHIVE_DB)
case DB_TYPE_ARCHIVE_DB:
- return new (alloc) ha_archive(table);
+ if (have_archive_db == SHOW_OPTION_YES)
+ return new (alloc) ha_archive(table);
+ return NULL;
#endif
#ifdef HAVE_BLACKHOLE_DB
case DB_TYPE_BLACKHOLE_DB:
- return new (alloc) ha_blackhole(table);
+ if (have_blackhole_db == SHOW_OPTION_YES)
+ return new (alloc) ha_blackhole(table);
+ return NULL;
#endif
#ifdef HAVE_FEDERATED_DB
case DB_TYPE_FEDERATED_DB:
- return new (alloc) ha_federated(table);
+ if (have_federated_db == SHOW_OPTION_YES)
+ return new (alloc) ha_federated(table);
+ return NULL;
#endif
#ifdef HAVE_CSV_DB
case DB_TYPE_CSV_DB:
- return new (alloc) ha_tina(table);
+ if (have_csv_db == SHOW_OPTION_YES)
+ return new (alloc) ha_tina(table);
+ return NULL;
#endif
#ifdef HAVE_NDBCLUSTER_DB
case DB_TYPE_NDBCLUSTER:
- return new (alloc) ha_ndbcluster(table);
+ if (have_ndbcluster == SHOW_OPTION_YES)
+ return new (alloc) ha_ndbcluster(table);
+ return NULL;
#endif
case DB_TYPE_HEAP:
return new (alloc) ha_heap(table);
@@ -346,8 +363,6 @@ handler *get_new_handler(TABLE *table, MEM_ROOT *alloc, enum db_type db_type)
/* Fall back to MyISAM */
case DB_TYPE_MYISAM:
return new (alloc) ha_myisam(table);
- case DB_TYPE_MRG_MYISAM:
- return new (alloc) ha_myisammrg(table);
}
}