List:Commits« Previous MessageNext Message »
From:tim Date:July 20 2006 7:41pm
Subject:bk commit into 5.0 tree (tsmith:1.2211) BUG#15195
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tim. When tim 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@stripped, 2006-07-20 13:41:00-06:00, tsmith@stripped +3 -0
  Finish the merge of the patch for bug #15195 from 4.1 -> 5.0
  - Adapt it to work with the handlerton class

  sql/handler.cc@stripped, 2006-07-20 13:40:57-06:00, tsmith@stripped +3 -1
    Only create new MERGE handler if merge engine is enabled

  sql/mysql_priv.h@stripped, 2006-07-20 13:40:57-06:00, tsmith@stripped +4 -1
    Use the myisammrg_hton.state field for the have_merge_db option

  sql/mysqld.cc@stripped, 2006-07-20 13:40:57-06:00, tsmith@stripped +5 -0
    Handle the OPT_MERGE (--skip-merge) option case

# 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:	tsmith
# Host:	siva.hindu.god
# Root:	/usr/home/tim/m/bk/merge-41-50

--- 1.215/sql/handler.cc	2006-07-20 13:41:08 -06:00
+++ 1.216/sql/handler.cc	2006-07-20 13:41:08 -06:00
@@ -302,7 +302,9 @@
 #endif
   case DB_TYPE_MRG_MYISAM:
   case DB_TYPE_MRG_ISAM:
-    return new (alloc) ha_myisammrg(table);
+    if (have_merge_db == SHOW_OPTION_YES)
+      return new (alloc) ha_myisammrg(table);
+    return NULL;
 #ifdef HAVE_BERKELEY_DB
   case DB_TYPE_BERKELEY_DB:
     if (have_berkeley_db == SHOW_OPTION_YES)

--- 1.399/sql/mysql_priv.h	2006-07-20 13:41:08 -06:00
+++ 1.400/sql/mysql_priv.h	2006-07-20 13:41:08 -06:00
@@ -1323,8 +1323,11 @@
 extern SHOW_COMP_OPTION have_ndbcluster;
 #endif
 
+/* MRG_MYISAM handler is always built, but may be skipped */
+extern handlerton myisammrg_hton;
+#define have_merge_db myisammrg_hton.state
+
 extern SHOW_COMP_OPTION have_isam;
-extern SHOW_COMP_OPTION have_merge_db;
 extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_dlopen;
 extern SHOW_COMP_OPTION have_query_cache;
 extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;

--- 1.561/sql/mysqld.cc	2006-07-20 13:41:08 -06:00
+++ 1.562/sql/mysqld.cc	2006-07-20 13:41:08 -06:00
@@ -6887,6 +6887,11 @@
     global_system_variables.tx_isolation= (type-1);
     break;
   }
+  case OPT_MERGE:
+    if (opt_merge)
+      have_merge_db= SHOW_OPTION_YES;
+    else
+      have_merge_db= SHOW_OPTION_DISABLED;
 #ifdef HAVE_BERKELEY_DB
   case OPT_BDB_NOSYNC:
     /* Deprecated option */
Thread
bk commit into 5.0 tree (tsmith:1.2211) BUG#15195tim20 Jul