List:Internals« Previous MessageNext Message »
From:Stewart Smith Date:March 18 2005 1:16am
Subject:bk commit into 5.1 tree (stewart:1.1816)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of stewart. When stewart 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.1816 05/03/18 12:16:19 stewart@stripped +2 -0
  Merge

  sql/ha_ndbcluster.cc
    1.175 05/03/18 12:16:18 stewart@stripped +0 -0
    SCCS merged

  sql/ha_ndbcluster.h
    1.80 05/03/18 12:10:33 stewart@stripped +0 -0
    Auto merged

# 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:	stewart
# Host:	kennedy.(none)
# Root:	/home/stewart/Documents/MySQL/5.1/ndb-wl2325/RESYNC

--- 1.174/sql/ha_ndbcluster.cc	2005-03-18 06:03:56 +11:00
+++ 1.175/sql/ha_ndbcluster.cc	2005-03-18 12:16:18 +11:00
@@ -3918,6 +3918,8 @@
     {
       ; /* ToDo handle error */
     }
+    sql_print_information("NDB Replication: CREATE TABLE Event: %s",
+			  eventName.c_ptr());
   }
 #endif /* HAVE_REPLICATION */
 
@@ -4075,9 +4077,17 @@
   if (check_ndb_connection())
     DBUG_RETURN(HA_ERR_NO_CONNECTION);
 
+#ifdef HAVE_REPLICATION
+  if (opt_bin_log) {
+    sql_print_information("NDB Replication: Drop table %s",
+			  get_share(m_tabname)->op->getTable()->getName());
+    injector_ndb->dropEventOperation(get_share(m_tabname)->op);
+  }
+#endif
+
   /* Call ancestor function to delete .ndb file */
   handler::delete_table(name);
-  
+
   /* Drop the table from NDB */
   DBUG_RETURN(drop_table());
 }
@@ -4716,6 +4726,10 @@
     goto ndbcluster_init_error;
   }
 
+  (void) hash_init(&ndbcluster_open_tables,system_charset_info,32,0,0,
+                   (hash_get_key) ndbcluster_get_key,0,0);
+  pthread_mutex_init(&ndbcluster_mutex,MY_MUTEX_INIT_FAST);
+
 #ifdef HAVE_REPLICATION
   if (opt_bin_log)
   {
@@ -4743,9 +4757,6 @@
   }
 #endif /* HAVE_REPLICATION */
   
-  (void) hash_init(&ndbcluster_open_tables,system_charset_info,32,0,0,
-                   (hash_get_key) ndbcluster_get_key,0,0);
-  pthread_mutex_init(&ndbcluster_mutex,MY_MUTEX_INIT_FAST);
   pthread_mutex_init(&LOCK_ndb_util_thread, MY_MUTEX_INIT_FAST);
   pthread_cond_init(&COND_ndb_util_thread, NULL);
 
@@ -7185,6 +7196,11 @@
 			"NDB");
     DBUG_RETURN(-1);
   }
+
+#ifdef HAVE_REPLICATION
+  if (opt_bin_log)
+    get_share(table_name)->op= op;
+#endif
 
   int n_columns= table->getNoOfColumns();
   for (int j= 0; j < n_columns; j++)

--- 1.79/sql/ha_ndbcluster.h	2005-03-18 06:03:56 +11:00
+++ 1.80/sql/ha_ndbcluster.h	2005-03-18 12:10:33 +11:00
@@ -25,6 +25,7 @@
 #pragma interface                       /* gcc class implementation */
 #endif
 
+#include <ndbapi/NdbApi.hpp>
 #include <ndbapi_limits.h>
 
 class Ndb;             // Forward declaration
@@ -65,6 +66,9 @@
   uint table_name_length,use_count;
   uint commit_count_lock;
   ulonglong commit_count;
+#ifdef HAVE_REPLICATION
+  NdbEventOperation *op;
+#endif
 } NDB_SHARE;
 
 typedef enum ndb_item_type {
Thread
bk commit into 5.1 tree (stewart:1.1816)Stewart Smith18 Mar