List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 17 2010 10:15am
Subject:bzr push into mysql-5.5-telco-7.0 branch (magnus.blaudd:3123 to 3124)
View as plain text  
 3124 Magnus Blåudd	2010-11-17 [merge]
      Merge 7.0 -> 5.5-telco-7.0

    modified:
      storage/ndb/include/util/ndb_opts.h
      storage/ndb/src/common/util/ndb_opts.c
      storage/ndb/src/kernel/main.cpp
      storage/ndb/test/run-test/setup.cpp
 3123 Magnus Blåudd	2010-11-17
      ndb
       - set --configdir for ndb_mgmd to ndb_mgmd's datadir

    modified:
      mysql-test/mysql-test-run.pl
=== modified file 'storage/ndb/include/util/ndb_opts.h'
--- a/storage/ndb/include/util/ndb_opts.h	2010-10-27 11:32:32 +0000
+++ b/storage/ndb/include/util/ndb_opts.h	2010-11-17 10:02:52 +0000
@@ -131,9 +131,10 @@ void ndb_usage(void (*usagefunc)(void), 
                struct my_option *my_long_options);
 void ndb_short_usage_sub(const char* extra);
 
-
+my_bool ndb_is_load_default_arg_separator(const char* arg);
 
 #ifdef __cplusplus
 }
 #endif
+
 #endif /*_NDB_OPTS_H */

=== modified file 'storage/ndb/src/common/util/ndb_opts.c'
--- a/storage/ndb/src/common/util/ndb_opts.c	2010-08-16 17:02:58 +0000
+++ b/storage/ndb/src/common/util/ndb_opts.c	2010-11-17 10:01:47 +0000
@@ -97,3 +97,23 @@ void ndb_std_print_version()
   printf("MySQL distrib %s%s, for %s (%s)\n",
          NDB_VERSION_STRING,suffix,SYSTEM_TYPE,MACHINE_TYPE);
 }
+
+my_bool ndb_is_load_default_arg_separator(const char* arg)
+{
+#ifndef MYSQL_VERSION_ID
+#error "Need MYSQL_VERSION_ID defined"
+#endif
+
+#if MYSQL_VERSION_ID >= 50501
+  /*
+    load_default() in 5.5+ returns an extra arg which has to
+    be skipped when processing the argv array
+   */
+  if (arg == args_separator)
+    return TRUE;
+#else
+  (void)arg;
+#endif
+  return FALSE;
+}
+

=== modified file 'storage/ndb/src/kernel/main.cpp'
--- a/storage/ndb/src/kernel/main.cpp	2010-11-03 11:34:45 +0000
+++ b/storage/ndb/src/kernel/main.cpp	2010-11-17 10:01:47 +0000
@@ -144,7 +144,11 @@ real_main(int argc, char** argv)
   const char* progname = argv[0];
   Vector<BaseString> original_args;
   for (int i = 0; i < argc; i++)
+  {
+    if (ndb_is_load_default_arg_separator(argv[i]))
+      continue;
     original_args.push_back(argv[i]);
+  }
 
   int ho_error;
   if ((ho_error=handle_options(&argc, &argv, my_long_options,

=== modified file 'storage/ndb/test/run-test/setup.cpp'
--- a/storage/ndb/test/run-test/setup.cpp	2010-10-27 11:32:32 +0000
+++ b/storage/ndb/test/run-test/setup.cpp	2010-11-17 10:02:52 +0000
@@ -1,9 +1,8 @@
 #include "atrt.hpp"
 #include <ndb_global.h>
-#include <my_sys.h>
-#include <my_getopt.h>
-#include <NdbOut.hpp>
-#include <BaseString.hpp>
+#include <util/ndb_opts.h>
+#include <util/NdbOut.hpp>
+#include <util/BaseString.hpp>
 
 extern int g_mt;
 extern int g_mt_rr;
@@ -116,6 +115,8 @@ setup_config(atrt_config& config, const 
      */
     for (j = 0; j<(size_t)argc; j++)
     {
+      if (ndb_is_load_default_arg_separator(tmp[j]))
+        continue;
       for (k = 0; proc_args[k].name; k++)
       {
 	if (!strncmp(tmp[j], proc_args[k].name, strlen(proc_args[k].name)))
@@ -418,6 +419,8 @@ load_options(int argc, char** argv, int 
 {
   for (size_t i = 0; i<(size_t)argc; i++)
   {
+    if (ndb_is_load_default_arg_separator(argv[i]))
+      continue;
     for (size_t j = 0; f_options[j].name; j++)
     {
       const char * name = f_options[j].name;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-telco-7.0 branch (magnus.blaudd:3123 to 3124) Magnus Blåudd17 Nov