List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 3 2008 12:58pm
Subject:bzr push into mysql-5.1 branch (jonas:3031 to 3034)
View as plain text  
 3034 Jonas Oreland	2008-11-03
      ndb - atrt
        don't put CMD in environment, as we then overflow Parser::m_tokenBuffer (size==512)
        but write CMD directly into env.sh (only used there)
      
        this is a hack, we should somehow make the token-buffer dynamic...
        this fixes that autotest refuses to start in 6.4 (where CMD has grown in size)
modified:
  storage/ndb/test/run-test/files.cpp
  storage/ndb/test/run-test/setup.cpp

 3033 Jonas Oreland	2008-11-03
      ndb - kill windoze warnings
modified:
  storage/ndb/src/mgmsrv/ConfigInfo.cpp

 3032 Jonas Oreland	2008-11-03 [merge]
      merge 63 to 64
modified:
  storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
  storage/ndb/src/mgmsrv/ConfigInfo.cpp

 3031 Jonas Oreland	2008-11-01
      ndb - try to fix compile error on debx86-b
        align code with 6.0 variant
modified:
  strings/longlong2str_asm.c

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2008-10-10 09:32:12 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2008-11-03 08:34:28 +0000
@@ -318,7 +318,7 @@ pad32(Uint32 bytepos, Uint32 bitsused)
   {
     assert((bytepos & 3) == 0);
   }
-  Uint32 ret = 4 * ((bitsused + 31 >> 5)) +
+  Uint32 ret = 4 * ((bitsused + 31) >> 5) +
     ((bytepos + 3) & ~(Uint32)3);
   return ret;
 }

=== modified file 'storage/ndb/src/mgmsrv/ConfigInfo.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2008-10-29 17:02:11 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2008-11-03 08:36:33 +0000
@@ -4209,8 +4209,8 @@ add_node_connections(Vector<ConfigInfo::
     if(!tmp->get("NodeId2", &nodeId2)) continue;
     p_connections.put("", nodeId2, nodeId2);
 
-    p_connections2.put("", nodeId1 + nodeId2<<16, nodeId1);
-    p_connections2.put("", nodeId2 + nodeId1<<16, nodeId2);
+    p_connections2.put("", nodeId1 + (nodeId2<<16), nodeId1);
+    p_connections2.put("", nodeId2 + (nodeId1<<16), nodeId2);
   }
 
   Uint32 nNodes;
@@ -4243,7 +4243,7 @@ add_node_connections(Vector<ConfigInfo::
   for (i= 0; p_db_nodes.get("", i, &nodeId1); i++){
     for (Uint32 j= i+1;; j++){
       if(!p_db_nodes.get("", j, &nodeId2)) break;
-      if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy)) 
+      if(!p_connections2.get("", nodeId1+(nodeId2<<16), &dummy)) 
       {
 	if (!add_a_connection(sections,ctx,nodeId1,nodeId2,opt_ndb_shm))
 	  goto err;
@@ -4277,7 +4277,7 @@ add_node_connections(Vector<ConfigInfo::
   for (i= 0; p_mgm_nodes.get("", i, &nodeId1); i++){
     for (Uint32 j= i+1;; j++){
       if(!p_mgm_nodes.get("", j, &nodeId2)) break;
-      if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy))
+      if(!p_connections2.get("", nodeId1+(nodeId2<<16), &dummy))
       {
 	if (!add_a_connection(sections,ctx,nodeId1,nodeId2,0))
 	  goto err;

=== modified file 'storage/ndb/test/run-test/files.cpp'
--- a/storage/ndb/test/run-test/files.cpp	2008-08-23 20:29:50 +0000
+++ b/storage/ndb/test/run-test/files.cpp	2008-11-03 12:33:34 +0000
@@ -242,7 +242,7 @@ setup_files(atrt_config& config, int set
       BaseString tmp;
       tmp.assfmt("%s/env.sh", proc.m_proc.m_cwd.c_str());
       char **env = BaseString::argify(0, proc.m_proc.m_env.c_str());
-      if (env[0])
+      if (env[0] || proc.m_proc.m_path.length())
       {
 	Vector<BaseString> keys;
 	FILE *fenv = fopen(tmp.c_str(), "w+");
@@ -261,6 +261,16 @@ setup_files(atrt_config& config, int set
 	  keys.push_back(env[k]);
 	  free(env[k]);
 	}
+	if (proc.m_proc.m_path.length())
+	{
+	  fprintf(fenv, "CMD=\"%s", proc.m_proc.m_path.c_str());
+	  if (proc.m_proc.m_args.length())
+	  {
+	    fprintf(fenv, " %s", proc.m_proc.m_args.c_str());
+	  }
+	  fprintf(fenv, "\"\nexport CMD\n");
+	}
+	
 	fprintf(fenv, "PATH=%s/bin:%s/libexec:$PATH\n", g_prefix, g_prefix);
 	keys.push_back("PATH");
 	for (size_t k = 0; k<keys.size(); k++)

=== modified file 'storage/ndb/test/run-test/setup.cpp'
--- a/storage/ndb/test/run-test/setup.cpp	2008-10-28 15:18:33 +0000
+++ b/storage/ndb/test/run-test/setup.cpp	2008-11-03 12:33:34 +0000
@@ -371,15 +371,6 @@ load_process(atrt_config& config, atrt_c
     return false;
   }
   
-  if (proc.m_proc.m_path.length())
-  {
-    proc.m_proc.m_env.appfmt(" CMD=\"%s", proc.m_proc.m_path.c_str());
-    if (proc.m_proc.m_args.length())
-      proc.m_proc.m_env.append(" ");
-    proc.m_proc.m_env.append(proc.m_proc.m_args);
-    proc.m_proc.m_env.append("\" ");
-  }
-  
   if (type == atrt_process::AP_MYSQLD)
   {
     /**

Thread
bzr push into mysql-5.1 branch (jonas:3031 to 3034) Jonas Oreland3 Nov