List:Commits« Previous MessageNext Message »
From:jonas Date:September 14 2006 11:57am
Subject:bk commit into 5.0 tree (jonas:1.2246) BUG#22195
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas 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-09-14 11:57:15+02:00, jonas@stripped +1 -0
  ndb - bug#22195
    also bind client to local host name if specified

  ndb/src/common/transporter/Transporter.cpp@stripped, 2006-09-14 11:57:14+02:00,
jonas@stripped +14 -4
    Add binding also of transporter connection (to hostname specified in config file)

# 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:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/50-work

--- 1.20/ndb/src/common/transporter/Transporter.cpp	2006-09-14 11:57:18 +02:00
+++ 1.21/ndb/src/common/transporter/Transporter.cpp	2006-09-14 11:57:18 +02:00
@@ -60,9 +60,6 @@
   }
   strncpy(localHostName, lHostName, sizeof(localHostName));
 
-  if (strlen(lHostName) > 0)
-    Ndb_getInAddr(&localHostAddress, lHostName);
-
   DBUG_PRINT("info",("rId=%d lId=%d isServer=%d rHost=%s lHost=%s s_port=%d",
 		     remoteNodeId, localNodeId, isServer,
 		     remoteHostName, localHostName,
@@ -128,10 +125,23 @@
     return true;
 
   if(isMgmConnection)
+  {
     sockfd= m_transporter_registry.connect_ndb_mgmd(m_socket_client);
+  }
   else
+  {
+    if (!m_socket_client->init())
+    {
+      return false;
+    }
+    if (strlen(localHostName) > 0)
+    {
+      if (m_socket_client->bind(localHostName, 0) != 0)
+	return false;
+    }
     sockfd= m_socket_client->connect();
-
+  }
+  
   return connect_client(sockfd);
 }  
 
Thread
bk commit into 5.0 tree (jonas:1.2246) BUG#22195jonas14 Sep