List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:December 14 2005 11:01pm
Subject:bk commit into 5.0 tree (jimw:1.1978) BUG#15185
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1978 05/12/14 15:01:02 jimw@stripped +1 -0
  Fix crash when trying to open table using a disabled storage engine. (Bug #15185)

  sql/handler.cc
    1.207 05/12/14 15:00:58 jimw@stripped +25 -10
    Don't create handler object for engines that are disabled.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-15185

--- 1.206/sql/handler.cc	2005-12-13 16:08:41 -08:00
+++ 1.207/sql/handler.cc	2005-12-14 15:00:58 -08:00
@@ -300,39 +300,56 @@
   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) && !defined(__NETWARE__)
   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 @@
   /* 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);
   }
 }
 
Thread
bk commit into 5.0 tree (jimw:1.1978) BUG#15185Jim Winstead14 Dec