List:Commits« Previous MessageNext Message »
From:Tomas Ulin Date:December 2 2008 1:52pm
Subject:bzr push into mysql-5.1 branch (tomas.ulin:2776 to 2777) Bug#40854
View as plain text  
 2777 Tomas Ulin	2008-12-02
      Bug #40854  SHOW TABLES removes tables from Cluster
modified:
  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp

 2776 Tomas Ulin	2008-11-28 [merge]
      merge
modified:
  sql/ha_ndbcluster.cc
  storage/ndb/test/run-test/command.cpp
  storage/ndb/test/run-test/setup.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2008-11-21 11:02:45 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2008-12-02 12:45:39 +0000
@@ -8408,18 +8408,8 @@ flush:
       ListTablesConf * const conf = (ListTablesConf*)signal->getDataPtrSend();
       conf->senderData = senderData;
       conf->noOfTables = count;
-      if (handle.m_cnt)
-      {
-        jam();
-        sendSignal(rg, GSN_LIST_TABLES_CONF, signal,
-                   sigLen, JBB, &handle);
-      }
-      else
-      {
-        jam();
-        sendSignal(rg, GSN_LIST_TABLES_CONF, signal,
-                   sigLen, JBB);
-      }
+      sendSignal(rg, GSN_LIST_TABLES_CONF, signal,
+                 sigLen, JBB, &handle);
 
       signal->header.m_noOfSections = 0;
       signal->header.m_fragmentInfo = 0;

=== modified file 'storage/ndb/src/mgmapi/LocalConfig.cpp'
--- a/storage/ndb/src/mgmapi/LocalConfig.cpp	2008-11-17 14:20:48 +0000
+++ b/storage/ndb/src/mgmapi/LocalConfig.cpp	2008-11-27 14:36:26 +0000
@@ -275,7 +275,8 @@ LocalConfig::parseString(const char * co
     err.assfmt("Unexpected entry: \"%s\"", tok);
     return false;
   }
-
+  bind_address_port= 0;
+  bind_address.assign("");
   return true;
 }
 
@@ -343,6 +344,15 @@ char *
 LocalConfig::makeConnectString(char *buf, int sz)
 {
   int p= BaseString::snprintf(buf,sz,"nodeid=%d", _ownNodeId);
+  if (p < sz && bind_address.length())
+  {
+    int new_p= p+BaseString::snprintf(buf+p,sz-p,",bind-address=%s:%d",
+                                      bind_address.c_str(), bind_address_port);
+    if (new_p < sz)
+      p= new_p;
+    else 
+      buf[p]= 0;
+  }
   if (p < sz)
     for (unsigned i = 0; i < ids.size(); i++)
     {
@@ -356,6 +366,18 @@ LocalConfig::makeConnectString(char *buf
       {
 	buf[p]= 0;
 	break;
+      }
+      if (!bind_address.length() && ids[i].bind_address.length())
+      {
+        new_p= p+BaseString::snprintf(buf+p,sz-p,",bind-address=%s:%d",
+                                      ids[i].bind_address.c_str(),
ids[i].bind_address_port);
+        if (new_p < sz)
+          p= new_p;
+        else 
+        {
+            buf[p]= 0;
+            break;
+        }
       }
     }
   buf[sz-1]=0;

=== modified file 'storage/ndb/src/mgmapi/mgmapi.cpp'
--- a/storage/ndb/src/mgmapi/mgmapi.cpp	2008-11-19 10:31:54 +0000
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp	2008-11-27 14:36:26 +0000
@@ -237,6 +237,8 @@ ndb_mgm_set_connectstring(NdbMgmHandle h
     DBUG_RETURN(-1);
   }
   handle->cfg_i= -1;
+  handle->cfg.bind_address_port= handle->m_bindaddress_port;
+  handle->cfg.bind_address.assign(handle->m_bindaddress ? handle->m_bindaddress
: "");
   DBUG_RETURN(0);
 }
 
@@ -264,6 +266,11 @@ ndb_mgm_set_bindaddress(NdbMgmHandle han
   {
     handle->m_bindaddress = 0;
     handle->m_bindaddress_port = 0;
+  }
+  if (handle->cfg.ids.size() != 0)
+  {
+    handle->cfg.bind_address_port= handle->m_bindaddress_port;
+    handle->cfg.bind_address.assign(handle->m_bindaddress ?
handle->m_bindaddress : "");
   }
   DBUG_RETURN(0);
 }

Thread
bzr push into mysql-5.1 branch (tomas.ulin:2776 to 2777) Bug#40854Tomas Ulin2 Dec