List:Commits« Previous MessageNext Message »
From:jonas Date:June 28 2006 10:53am
Subject:bk commit into 5.0 tree (jonas:1.2175)
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
  1.2175 06/06/28 12:53:40 jonas@stripped +1 -0
  ndb atrt -
    optionally put mysqld socket in default place

  ndb/test/run-test/setup.cpp
    1.8 06/06/28 12:53:37 jonas@stripped +27 -3
    Put mysqld socket in default place if g_default_ports

# 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-atrt

--- 1.7/ndb/test/run-test/setup.cpp	2006-06-08 13:55:04 +02:00
+++ 1.8/ndb/test/run-test/setup.cpp	2006-06-28 12:53:37 +02:00
@@ -687,10 +687,34 @@ generate(atrt_process& proc, const char 
   }
   else if (strcmp(name, "--socket=") == 0)
   {
+    const char * sock = 0;
+    if (g_default_ports)
+    {
+      sock = "/tmp/mysql.sock";
+      atrt_host * host = proc.m_host;
+      for (size_t i = 0; i<host->m_processes.size(); i++)
+      {
+	const char * val;
+	if (host->m_processes[i]->m_options.m_loaded.get(name, &val))
+	{
+	  if (strcmp(sock, val) == 0)
+	  {
+	    sock = 0;
+	    break;
+	  }
+	}
+      }
+    }
+    
     BaseString tmp;
-    tmp.appfmt("%s/mysql.sock", proc.m_proc.m_cwd.c_str());
-    opts.m_loaded.put(name, tmp.c_str());
-    opts.m_generated.put(name, tmp.c_str());
+    if (sock == 0)
+    {
+      tmp.assfmt("%s/mysql.sock", proc.m_proc.m_cwd.c_str());
+      sock = tmp.c_str();
+    }
+    
+    opts.m_loaded.put(name, sock);
+    opts.m_generated.put(name, sock);
     return true;
   }
   else if (strcmp(name, "--server-id=") == 0)
Thread
bk commit into 5.0 tree (jonas:1.2175)jonas28 Jun