MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:January 7 2009 2:26pm
Subject:bzr push into mysql-5.1 branch (msvensson:3195 to 3196)
View as plain text  
 3196 Magnus Svensson	2009-01-07 [merge]
      Merge
modified:
  storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp
  storage/ndb/src/common/util/ndb_opts.c
  storage/ndb/src/mgmapi/LocalConfig.cpp
  storage/ndb/src/mgmsrv/ConfigManager.cpp
  storage/ndb/src/mgmsrv/Services.cpp
  storage/ndb/src/mgmsrv/main.cpp
  storage/ndb/src/ndbapi/TransporterFacade.cpp

 3195 Magnus Svensson	2009-01-07 [merge]
      Merge

=== modified file 'storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp'
--- a/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp	2008-11-26 12:59:58 +0000
+++ b/storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp	2009-01-07 09:55:03 +0000
@@ -45,9 +45,9 @@ ConfigRetriever::ConfigRetriever(const c
                                  int timeout_ms)
 {
   DBUG_ENTER("ConfigRetriever::ConfigRetriever");
-  DBUG_PRINT("enter", ("%s, version: %d, node_type: %d, bind: %s, timeout: %d",
-                       _connect_string, version, node_type,
-                       _bindaddress, timeout_ms));
+  DBUG_PRINT("enter", ("connect_string: '%s'", _connect_string));
+  DBUG_PRINT("enter", ("version: %d, node_type: %d, bind: %s, timeout: %d",
+                       version, node_type,_bindaddress, timeout_ms));
 
   m_version = version;
   m_node_type = node_type;

=== modified file 'storage/ndb/src/common/util/ndb_opts.c'
--- a/storage/ndb/src/common/util/ndb_opts.c	2008-11-25 20:45:22 +0000
+++ b/storage/ndb/src/common/util/ndb_opts.c	2009-01-07 09:55:03 +0000
@@ -62,14 +62,9 @@ ndb_std_get_one_option(int optid,
   switch (optid) {
 #ifndef DBUG_OFF
   case '#':
-    if (opt_debug)
-    {
-      DBUG_PUSH(opt_debug);
-    }
-    else
-    {
-      DBUG_PUSH("d:t");
-    }
+    if (!opt_debug)
+      opt_debug= "d:t";
+    DBUG_SET_INITIAL(argument ? argument : opt_debug);
     opt_ndb_endinfo= 1;
     break;
 #endif

=== modified file 'storage/ndb/src/mgmapi/LocalConfig.cpp'
--- a/storage/ndb/src/mgmapi/LocalConfig.cpp	2008-12-02 14:25:58 +0000
+++ b/storage/ndb/src/mgmapi/LocalConfig.cpp	2009-01-07 09:55:03 +0000
@@ -29,7 +29,6 @@ bool
 LocalConfig::init(const char *connectString,
 		  const char *fileName)
 {
-  DBUG_ENTER("LocalConfig::init");
   /** 
    * Escalation:
    *  1. Check connectString
@@ -46,19 +45,19 @@ LocalConfig::init(const char *connectStr
   if(connectString != 0 && connectString[0] != 0){
     if(readConnectString(connectString, "connect string")){
       if (ids.size())
-	DBUG_RETURN(true);
+	return true;
       // only nodeid given, continue to find hosts
     } else
-      DBUG_RETURN(false);
+      return false;
   }
 
   //2. Check given filename
   if (fileName && strlen(fileName) > 0) {
     bool fopenError;
     if(readFile(fileName, fopenError)){
-      DBUG_RETURN(true);
+      return true;
     }
-    DBUG_RETURN(false);
+    return false;
   }
 
   //3. Check environment variable
@@ -66,9 +65,9 @@ LocalConfig::init(const char *connectStr
   if(NdbEnv_GetEnv("NDB_CONNECTSTRING", buf, sizeof(buf)) &&
      strlen(buf) != 0){
     if(readConnectString(buf, "NDB_CONNECTSTRING")){
-      DBUG_RETURN(true);
+      return true;
     }
-    DBUG_RETURN(false);
+    return false;
   }
   
   //4. Check Ndb.cfg in NDB_HOME
@@ -77,9 +76,9 @@ LocalConfig::init(const char *connectStr
     char *buf2= NdbConfig_NdbCfgName(1 /*true*/);
     NdbAutoPtr<char> tmp_aptr(buf2);
     if(readFile(buf2, fopenError))
-      DBUG_RETURN(true);
+      return true;
     if (!fopenError)
-      DBUG_RETURN(false);
+      return false;
   }
 
   //5. Check Ndb.cfg in cwd
@@ -88,9 +87,9 @@ LocalConfig::init(const char *connectStr
     char *buf2= NdbConfig_NdbCfgName(0 /*false*/);
     NdbAutoPtr<char> tmp_aptr(buf2);
     if(readFile(buf2, fopenError))
-      DBUG_RETURN(true);
+      return true;
     if (!fopenError)
-      DBUG_RETURN(false);
+      return false;
   }
 
   //7. Check
@@ -98,12 +97,12 @@ LocalConfig::init(const char *connectStr
     char buf2[256];
     BaseString::snprintf(buf2, sizeof(buf2), "host=localhost:%s", NDB_PORT);
     if(readConnectString(buf2, "default connect string"))
-      DBUG_RETURN(true);
+      return true;
   }
 
   setError(0, "");
 
-  DBUG_RETURN(false);
+  return false;
 }
 
 LocalConfig::~LocalConfig(){

=== modified file 'storage/ndb/src/mgmsrv/ConfigManager.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigManager.cpp	2008-12-17 16:09:24 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigManager.cpp	2009-01-02 09:35:46 +0000
@@ -243,7 +243,6 @@ ConfigManager::find_nodeid_from_config(v
   }
 
   return found_nodeid;
-
 }
 
 
@@ -283,7 +282,6 @@ ConfigManager::init_nodeid(void)
     DBUG_RETURN(true);
   }
 
-
   // We _could_ try connecting to other running mgmd(s)
   // and fetch our nodeid. But, that introduces a dependency
   // that is not beneficial for a shared nothing cluster, since
@@ -477,6 +475,7 @@ ConfigManager::prepareConfigChange(const
                          "when already prepared");
     return false;
   }
+
   Uint32 generation= config->getGeneration();
   if (generation == 0)
   {
@@ -538,7 +537,7 @@ ConfigManager::prepareConfigChange(const
   }
 
 #ifdef __WIN__
-  /* 
+  /*
 	File is opened with the commit flag "c" so
 	that the contents of the file buffer are written
 	directly to disk when fflush is called
@@ -598,7 +597,6 @@ ConfigManager::set_config(Config* new_co
 
   for (unsigned i = 0; i < m_subscribers.size(); i++)
     m_subscribers[i]->config_changed(m_node_id, new_config);
-
 }
 
 
@@ -634,7 +632,6 @@ ConfigManager::config_ok(const Config* c
                          datadir);
     return false;
   }
-
   return true;
 }
 
@@ -1725,7 +1722,7 @@ ConfigManager::delete_saved_configs(void
                            full_name.c_str());
       if (!delete_file(full_name.c_str()))
       {
-        // Make function return false3, but continue and try
+        // Make function return false, but continue and try
         // to delete other files
         result = false;
       }
@@ -1767,7 +1764,7 @@ ConfigManager::saved_config_exists(BaseS
   if (max_version == 0)
     return false;
 
-  config_name.assfmt("%s%sndb_%u_config.bin.%u", 
+  config_name.assfmt("%s%sndb_%u_config.bin.%u",
                      m_configdir, DIR_SEPARATOR, m_node_id, max_version);
   return true;
 }

=== modified file 'storage/ndb/src/mgmsrv/Services.cpp'
--- a/storage/ndb/src/mgmsrv/Services.cpp	2008-12-19 22:23:14 +0000
+++ b/storage/ndb/src/mgmsrv/Services.cpp	2009-01-07 09:55:03 +0000
@@ -338,7 +338,7 @@ MgmApiSession::MgmApiSession(class MgmtS
   SOCKET_SIZE_TYPE addrlen= sizeof(addr);
   my_getpeername(sock, (struct sockaddr*)&addr, &addrlen);
   m_name.assfmt("%s:%d", inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
-
+  DBUG_PRINT("info", ("new connection from: %s", m_name.c_str()));
   DBUG_VOID_RETURN;
 }
 

=== modified file 'storage/ndb/src/mgmsrv/main.cpp'
--- a/storage/ndb/src/mgmsrv/main.cpp	2008-12-16 14:31:45 +0000
+++ b/storage/ndb/src/mgmsrv/main.cpp	2009-01-07 09:55:03 +0000
@@ -172,7 +172,7 @@ int main(int argc, char** argv)
 
   int ho_error;
 #ifndef DBUG_OFF
-  opt_debug= "d:t:O,/tmp/ndb_mgmd.trace";
+  opt_debug= "d:t:i:F:o,/tmp/ndb_mgmd.trace";
 #endif
   if ((ho_error=handle_options(&argc, &argv, my_long_options, 
 			       ndb_std_get_one_option)))

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp	2008-12-12 14:30:54 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp	2009-01-07 09:48:44 +0000
@@ -838,7 +838,6 @@ TransporterFacade::configure(NodeId node
 void
 TransporterFacade::for_each(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
 {
-  DBUG_ENTER("TransporterFacade::for_each");
   Uint32 sz = m_threads.m_statusNext.size();
   TransporterFacade::ThreadData::Object_Execute oe; 
   for (Uint32 i = 0; i < sz ; i ++) 
@@ -849,7 +848,6 @@ TransporterFacade::for_each(NdbApiSignal
       (* oe.m_executeFunction) (oe.m_object, aSignal, ptr);
     }
   }
-  DBUG_VOID_RETURN;
 }
 
 void

Thread
bzr push into mysql-5.1 branch (msvensson:3195 to 3196) Magnus Svensson7 Jan