MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jonas oreland Date:December 1 2010 1:36pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas:4037 to 4038)
View as plain text  
 4038 jonas oreland	2010-12-01
      ndb - fix rare bug with conflicting file-names for config-testing

    modified:
      storage/ndb/src/mgmsrv/testConfig.cpp
 4037 jonas oreland	2010-12-01 [merge]
      ndb - merge 63 to 70

    modified:
      mysql-test/suite/ndb/r/ndb_update_no_read.result
      mysql-test/suite/ndb/t/ndb_update_no_read.test
      sql/ha_ndbcluster.cc
=== modified file 'storage/ndb/src/mgmsrv/testConfig.cpp'
--- a/storage/ndb/src/mgmsrv/testConfig.cpp	2010-11-28 11:34:01 +0000
+++ b/storage/ndb/src/mgmsrv/testConfig.cpp	2010-12-01 13:36:29 +0000
@@ -146,6 +146,23 @@ create_config(const char* first, ...)
 // Global variable for my_getopt
 extern "C" const char* my_defaults_file;
 
+#ifdef _WIN32
+#include <process.h>
+#else
+#include <unistd.h>
+#endif
+
+static
+unsigned
+pid()
+{
+#ifdef _WIN32
+  return (unsigned)_getpid();
+#else
+  return (unsigned)getpid();
+#endif
+}
+
 Config*
 create_mycnf(const char* first, ...)
 {
@@ -153,8 +170,8 @@ create_mycnf(const char* first, ...)
 
   NdbDir::Temp tempdir;
   BaseString mycnf_file;
-  mycnf_file.assfmt("%s%s%s",
-                    tempdir.path(), DIR_SEPARATOR, "test_my.cnf");
+  mycnf_file.assfmt("%s%stest_my.%u.cnf",
+                    tempdir.path(), DIR_SEPARATOR, pid());
 
   FILE* config_file= fopen(mycnf_file.c_str(), "w+");
   CHECK(config_file);
@@ -174,6 +191,7 @@ create_mycnf(const char* first, ...)
     printf("%s", buf);
 #endif
 
+  fflush(config_file);
   rewind(config_file);
 
   // Trick handle_options to read from the temp file

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas:4037 to 4038) jonas oreland1 Dec