List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 25 2008 12:22pm
Subject:bzr commit into mysql-5.1 branch (jonas:2703)
View as plain text  
#At file:///home/jonas/src/telco-6.3/

 2703 Jonas Oreland	2008-09-25 [merge]
      merge 62 to 63
modified:
  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
  storage/ndb/test/run-test/db.cpp
  storage/ndb/test/run-test/main.cpp
  storage/ndb/test/run-test/setup.cpp

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2008-06-25 13:00:44 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2008-09-25 10:22:38 +0000
@@ -1326,7 +1326,9 @@ NdbEventBuffer::nextEvent()
          {
            // moved to next gci, check if any references have been
            // released when completing the last gci
+           NdbMutex_Lock(m_mutex);
            deleteUsedEventOperations();
+           NdbMutex_Unlock(m_mutex);
            gci_ops = m_available_data.delete_next_gci_ops();
          }
          if (!gci_ops->m_consistent)
@@ -1357,12 +1359,14 @@ NdbEventBuffer::nextEvent()
   // free all "per gci unique" collected operations
   // completed gci, check if any references have been
   // released when completing the gci
+  NdbMutex_Lock(m_mutex);
   EventBufData_list::Gci_ops *gci_ops = m_available_data.first_gci_ops();
   while (gci_ops)
   {
     deleteUsedEventOperations();
     gci_ops = m_available_data.delete_next_gci_ops();
   }
+  NdbMutex_Unlock(m_mutex);
   DBUG_RETURN_EVENT(0);
 }
 

=== modified file 'storage/ndb/test/run-test/db.cpp'
--- a/storage/ndb/test/run-test/db.cpp	2008-08-27 11:42:30 +0000
+++ b/storage/ndb/test/run-test/db.cpp	2008-09-25 10:21:14 +0000
@@ -23,6 +23,17 @@ static bool setup_repl(atrt_config&);
 
 static atrt_process* f_mysqld = 0;
 
+static
+int
+run_query(atrt_process* src, const char * query)
+{
+  g_logger.debug("%s:%s - %s",
+		 src->m_cluster->m_name.c_str(),
+		 src->m_host->m_hostname.c_str(),
+		 query);
+  return mysql_query(&src->m_mysql, query);
+}
+
 bool
 setup_db(atrt_config& config)
 {
@@ -398,16 +409,16 @@ populate_db(atrt_config& config, atrt_pr
 
 static
 bool
-setup_repl(atrt_process* src, atrt_process* dst)
+setup_repl(atrt_process* dst, atrt_process* src)
 {
-  if (mysql_query(&src->m_mysql, "STOP SLAVE"))
+  if (run_query(src, "STOP SLAVE"))
   {
     g_logger.error("Failed to stop slave: %s",
 		   mysql_error(&src->m_mysql));
     return false;
   }
 
-  if (mysql_query(&src->m_mysql, "RESET SLAVE"))
+  if (run_query(src, "RESET SLAVE"))
   {
     g_logger.error("Failed to reset slave: %s",
 		   mysql_error(&src->m_mysql));
@@ -421,7 +432,7 @@ setup_repl(atrt_process* src, atrt_proce
 	     dst->m_host->m_hostname.c_str(),
 	     atoi(find(dst, "--port=")));
   
-  if (mysql_query(&src->m_mysql, tmp.c_str()))
+  if (run_query(src, tmp.c_str()))
   {
     g_logger.error("Failed to setup repl from %s to %s: %s",
 		   src->m_host->m_hostname.c_str(),
@@ -430,7 +441,7 @@ setup_repl(atrt_process* src, atrt_proce
     return false;
   }
 
-  if (mysql_query(&src->m_mysql, "START SLAVE"))
+  if (run_query(src, "START SLAVE"))
   {
     g_logger.error("Failed to start slave: %s",
 		   mysql_error(&src->m_mysql));

=== modified file 'storage/ndb/test/run-test/main.cpp'
--- a/storage/ndb/test/run-test/main.cpp	2008-08-27 11:42:30 +0000
+++ b/storage/ndb/test/run-test/main.cpp	2008-09-25 10:21:14 +0000
@@ -767,8 +767,7 @@ wait_ndb(atrt_config& config, int goal){
     }
 
     if(handle == 0){
-      g_logger.critical("Unable to find mgm handle");
-      return false;
+      return true;
     }
     
     if(goal == NDB_MGM_NODE_STATUS_STARTED){

=== modified file 'storage/ndb/test/run-test/setup.cpp'
--- a/storage/ndb/test/run-test/setup.cpp	2008-09-04 09:43:51 +0000
+++ b/storage/ndb/test/run-test/setup.cpp	2008-09-25 10:21:14 +0000
@@ -34,10 +34,12 @@ struct proc_option f_options[] = {
   ,{ "--host=",        atrt_process::AP_CLIENT, 0 }
   ,{ "--server-id=",   atrt_process::AP_MYSQLD, PO_REP }
   ,{ "--log-bin",      atrt_process::AP_MYSQLD, PO_REP_MASTER }
+#if 0
   ,{ "--master-host=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
   ,{ "--master-port=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
   ,{ "--master-user=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
   ,{ "--master-password=", atrt_process::AP_MYSQLD, PO_REP_SLAVE }
+#endif
   ,{ "--ndb-connectstring=", atrt_process::AP_MYSQLD | atrt_process::AP_CLUSTER
      ,PO_NDB }
   ,{ "--ndbcluster", atrt_process::AP_MYSQLD, PO_NDB }

Thread
bzr commit into mysql-5.1 branch (jonas:2703) Jonas Oreland25 Sep