List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:July 6 2012 8:55am
Subject:bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4587 to 4588)
View as plain text  
 4588 magnus.blaudd@stripped	2012-07-06 [merge]
      Merge 7.0 -> 7.1

    added:
      storage/ndb/cmake/ndb_check_mysql_include_file.cmake
    renamed:
      storage/ndb/src/common/util/ndb_opts.c => storage/ndb/src/common/util/ndb_opts.cpp
    modified:
      storage/ndb/include/util/ndb_opts.h
      storage/ndb/ndb_configure.cmake
      storage/ndb/src/common/util/CMakeLists.txt
      storage/ndb/src/common/util/Makefile.am
      storage/ndb/src/kernel/main.cpp
      storage/ndb/src/mgmclient/main.cpp
      storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
      storage/ndb/src/mgmsrv/main.cpp
      storage/ndb/test/ndbapi/testBitfield.cpp
      storage/ndb/test/ndbapi/test_event_multi_table.cpp
      storage/ndb/test/run-test/atrt.hpp
      storage/ndb/test/run-test/main.cpp
      storage/ndb/test/src/NDBT_Test.cpp
      storage/ndb/test/tools/connect.cpp
      storage/ndb/test/tools/hugoJoin.cpp
      storage/ndb/test/tools/log_listner.cpp
      storage/ndb/src/common/util/ndb_opts.cpp
 4587 magnus.blaudd@stripped	2012-07-05 [merge]
      Merge 7.0 -> 7.1

    modified:
      mysql-test/suite/ndb/r/ndb_blob_big.result
      mysql-test/suite/ndb/t/ndb_blob_big.test
      storage/ndb/src/mgmapi/CMakeLists.txt
=== added file 'storage/ndb/cmake/ndb_check_mysql_include_file.cmake'
--- a/storage/ndb/cmake/ndb_check_mysql_include_file.cmake	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/cmake/ndb_check_mysql_include_file.cmake	2012-07-05 11:19:04 +0000
@@ -0,0 +1,29 @@
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+MACRO(NDB_CHECK_MYSQL_INCLUDE_FILE INCLUDE VARIABLE)
+  IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
+    SET(_msg "Looking for MySQL include file ${INCLUDE}")
+    MESSAGE(STATUS "${_msg}")
+    IF(EXISTS ${CMAKE_SOURCE_DIR}/include/${INCLUDE})
+      MESSAGE(STATUS "${_msg} - found")
+      SET(${VARIABLE} 1 CACHE_INTERNAL "Have MySQL include ${INCLUDE}")
+    ELSE()
+      MESSAGE(STATUS "${_msg} - found")
+      SET(${VARIABLE} "" CACHE_INTERNAL "Have MySQL include ${INCLUDE}")
+    ENDIF()
+  ENDIF()
+ENDMACRO()
+

=== modified file 'storage/ndb/include/util/ndb_opts.h'
--- a/storage/ndb/include/util/ndb_opts.h	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/include/util/ndb_opts.h	2012-07-05 11:19:04 +0000
@@ -132,6 +132,13 @@ void ndb_short_usage_sub(const char* ext
 
 my_bool ndb_is_load_default_arg_separator(const char* arg);
 
+/* Read the given [groups] from <conf_file> and return in argc/argv */
+int ndb_load_defaults(const char* conf_file,
+                      const char** groups,
+                      int *argc, char*** argv);
+/* Free memory returned in "argv" from ndb_load_defaults() */
+void ndb_free_defaults(char** argv);
+
 #ifdef __cplusplus
 }
 #endif

=== modified file 'storage/ndb/ndb_configure.cmake'
--- a/storage/ndb/ndb_configure.cmake	2012-06-11 14:47:18 +0000
+++ b/storage/ndb/ndb_configure.cmake	2012-07-06 08:42:21 +0000
@@ -44,6 +44,7 @@ INCLUDE(CheckCSourceCompiles)
 INCLUDE(CheckCXXSourceCompiles)
 INCLUDE(CheckCXXSourceRuns)
 INCLUDE(ndb_require_variable)
+INCLUDE(ndb_check_mysql_include_file)
 
 CHECK_FUNCTION_EXISTS(posix_memalign HAVE_POSIX_MEMALIGN)
 CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME)
@@ -214,6 +215,11 @@ IF(WITH_NDB_PORT GREATER 0)
   MESSAGE(STATUS "Setting MySQL Cluster management server port to ${NDB_PORT}")
 ENDIF()
 
+#
+# Check which MySQL include files exists
+#
+NDB_CHECK_MYSQL_INCLUDE_FILE(my_default.h HAVE_MY_DEFAULT_H)
+
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/ndb_config.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/include/ndb_config.h)
 

=== modified file 'storage/ndb/src/common/util/CMakeLists.txt'
--- a/storage/ndb/src/common/util/CMakeLists.txt	2011-09-08 06:22:07 +0000
+++ b/storage/ndb/src/common/util/CMakeLists.txt	2012-07-06 08:42:21 +0000
@@ -48,7 +48,7 @@ ADD_CONVENIENCE_LIBRARY(ndbgeneral
             strdup.c
             ConfigValues.cpp
             ndb_init.cpp
-            ndb_opts.c
+            ndb_opts.cpp
             basestring_vsnprintf.c
             Bitmask.cpp
 	    SparseBitmask.cpp
@@ -58,7 +58,14 @@ ADD_CONVENIENCE_LIBRARY(ndbgeneral
             HashMap2.cpp
             LinkedStack.cpp
 )
-TARGET_LINK_LIBRARIES(ndbgeneral ndbtrace ${ZLIB_LIBRARY} mysys)
+SET(NDBGENERAL_LIBS ndbtrace ${ZLIB_LIBRARY} mysys)
+# Some parts of mysys has been split into it's own library
+# called mysys_ssl, existence of new library is indicated
+# by new include file my_default.h detected in ndb_configure.cmake
+IF(HAVE_MY_DEFAULT_H)
+  LIST(APPEND NDBGENERAL_LIBS mysys_ssl) 
+ENDIF()
+TARGET_LINK_LIBRARIES(ndbgeneral ${NDBGENERAL_LIBS})
 
 ADD_EXECUTABLE(BaseString-t BaseString.cpp)
 SET_TARGET_PROPERTIES(BaseString-t

=== modified file 'storage/ndb/src/common/util/Makefile.am'
--- a/storage/ndb/src/common/util/Makefile.am	2011-09-07 22:50:01 +0000
+++ b/storage/ndb/src/common/util/Makefile.am	2012-07-05 11:19:04 +0000
@@ -23,7 +23,7 @@ libgeneral_la_SOURCES = \
             SocketServer.cpp SocketClient.cpp SocketAuthenticator.cpp\
 	    OutputStream.cpp NdbOut.cpp BaseString.cpp \
             NdbSqlUtil.cpp \
-            uucode.c random.c version.cpp ndb_opts.c \
+            uucode.c random.c version.cpp ndb_opts.cpp \
             strdup.c \
             ConfigValues.cpp ndb_init.cpp basestring_vsnprintf.c \
             Bitmask.cpp SparseBitmask.cpp parse_mask.hpp \

=== renamed file 'storage/ndb/src/common/util/ndb_opts.c' => 'storage/ndb/src/common/util/ndb_opts.cpp'
--- a/storage/ndb/src/common/util/ndb_opts.c	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/src/common/util/ndb_opts.cpp	2012-07-05 11:19:04 +0000
@@ -19,7 +19,9 @@
 #include <ndb_opts.h>
 
 #include <ndb_version.h>
-
+#ifdef HAVE_MY_DEFAULT_H
+#include <my_default.h>
+#endif
 
 static void default_ndb_opt_short(void)
 {
@@ -40,6 +42,7 @@ static void default_ndb_opt_usage(void)
 static void (*g_ndb_opt_short_usage)(void)= default_ndb_opt_short;
 static void (*g_ndb_opt_usage)(void)= default_ndb_opt_usage;
 
+extern "C"
 void ndb_opt_set_usage_funcs(void (*short_usage)(void),
                              void (*usage)(void))
 {
@@ -60,6 +63,7 @@ const char* ndb_progname(void)
   return "<unknown program>";
 }
 
+extern "C"
 void ndb_short_usage_sub(const char* extra)
 {
   printf("Usage: %s [OPTIONS]%s%s\n", ndb_progname(),
@@ -67,6 +71,7 @@ void ndb_short_usage_sub(const char* ext
          (extra)?extra:"");
 }
 
+extern "C"
 void ndb_usage(void (*usagefunc)(void), const char *load_default_groups[],
                struct my_option *my_long_options)
 {
@@ -79,7 +84,7 @@ void ndb_usage(void (*usagefunc)(void), 
   my_print_variables(my_long_options);
 }
 
-
+extern "C"
 my_bool
 ndb_std_get_one_option(int optid,
                        const struct my_option *opt __attribute__((unused)),
@@ -104,6 +109,7 @@ ndb_std_get_one_option(int optid,
   return 0;
 }
 
+extern "C"
 void ndb_std_print_version()
 {
 #ifndef DBUG_OFF
@@ -115,6 +121,7 @@ void ndb_std_print_version()
          NDB_VERSION_STRING,suffix,SYSTEM_TYPE,MACHINE_TYPE);
 }
 
+extern "C"
 my_bool ndb_is_load_default_arg_separator(const char* arg)
 {
 #ifndef MYSQL_VERSION_ID
@@ -134,3 +141,19 @@ my_bool ndb_is_load_default_arg_separato
   return FALSE;
 }
 
+extern "C"
+int
+ndb_load_defaults(const char* conf_file, const char** groups,
+                  int *argc, char*** argv)
+{
+  return my_load_defaults(conf_file ? conf_file : MYSQL_CONFIG_NAME,
+                          groups, argc, argv, NULL);
+}
+
+extern "C"
+void
+ndb_free_defaults(char** argv)
+{
+  free_defaults(argv);
+}
+

=== modified file 'storage/ndb/src/kernel/main.cpp'
--- a/storage/ndb/src/kernel/main.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/kernel/main.cpp	2012-07-05 11:19:04 +0000
@@ -133,7 +133,7 @@ real_main(int argc, char** argv)
   g_eventLogger->m_logLevel.setLogLevel(LogLevel::llStartUp, 15);
 
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
 
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndbd.trace";

=== modified file 'storage/ndb/src/mgmclient/main.cpp'
--- a/storage/ndb/src/mgmclient/main.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/mgmclient/main.cpp	2012-07-05 11:19:04 +0000
@@ -115,7 +115,7 @@ int main(int argc, char** argv){
   NDB_INIT(argv[0]);
 
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL, load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_mgm.trace";

=== modified file 'storage/ndb/src/mgmsrv/InitConfigFileParser.cpp'
--- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp	2011-10-21 08:59:23 +0000
+++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp	2012-07-05 11:19:04 +0000
@@ -645,6 +645,9 @@ InitConfigFileParser::Context::reportWar
 
 #include <my_sys.h>
 #include <my_getopt.h>
+#ifdef HAVE_MY_DEFAULT_H
+#include <my_default.h>
+#endif
 
 static int order = 1;
 static 

=== modified file 'storage/ndb/src/mgmsrv/main.cpp'
--- a/storage/ndb/src/mgmsrv/main.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/src/mgmsrv/main.cpp	2012-07-05 11:19:04 +0000
@@ -176,7 +176,7 @@ static void mgmd_exit(int result)
   g_eventLogger->close();
 
   /* Free memory allocated by 'load_defaults' */
-  free_defaults(defaults_argv);
+  ndb_free_defaults(defaults_argv);
 
   ndb_end(opt_ndb_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
 
@@ -193,7 +193,7 @@ static int mgmd_main(int argc, char** ar
 
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
 
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL, load_default_groups,&argc,&argv);
   defaults_argv= argv; /* Must be freed by 'free_defaults' */
 
   int ho_error;

=== modified file 'storage/ndb/test/ndbapi/testBitfield.cpp'
--- a/storage/ndb/test/ndbapi/testBitfield.cpp	2011-04-08 11:06:53 +0000
+++ b/storage/ndb/test/ndbapi/testBitfield.cpp	2012-07-05 11:19:04 +0000
@@ -44,7 +44,7 @@ int 
 main(int argc, char** argv){
   NDB_INIT(argv[0]);
   const char *load_default_groups[]= { "mysql_cluster",0 };
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL, load_default_groups,&argc,&argv);
   int ho_error;
 
   if ((ho_error=handle_options(&argc, &argv, my_long_options,

=== modified file 'storage/ndb/test/ndbapi/test_event_multi_table.cpp'
--- a/storage/ndb/test/ndbapi/test_event_multi_table.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/test_event_multi_table.cpp	2012-07-05 11:19:04 +0000
@@ -269,7 +269,7 @@ main(int argc, char** argv)
 {
   NDB_INIT(argv[0]);
   const char *load_default_groups[]= { "mysql_cluster",0 };
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
 
   int ho_error;
 #ifndef DBUG_OFF

=== modified file 'storage/ndb/test/run-test/atrt.hpp'
--- a/storage/ndb/test/run-test/atrt.hpp	2012-02-17 13:41:44 +0000
+++ b/storage/ndb/test/run-test/atrt.hpp	2012-07-06 08:42:21 +0000
@@ -27,6 +27,11 @@
 #include <CpcClient.hpp>
 #include <Properties.hpp>
 #include <mysql.h>
+#include <my_sys.h>
+#include <my_getopt.h>
+#ifdef HAVE_MY_DEFAULT_H
+#include <my_default.h>
+#endif
 #include <my_dir.h>
 
 enum ErrorCodes 

=== modified file 'storage/ndb/test/run-test/main.cpp'
--- a/storage/ndb/test/run-test/main.cpp	2011-12-16 16:30:41 +0000
+++ b/storage/ndb/test/run-test/main.cpp	2012-07-06 08:42:21 +0000
@@ -22,9 +22,6 @@
 #endif
 
 #include "atrt.hpp"
-#include <my_sys.h>
-#include <my_getopt.h>
-
 #include <NdbOut.hpp>
 #include <NdbAutoPtr.hpp>
 

=== modified file 'storage/ndb/test/src/NDBT_Test.cpp'
--- a/storage/ndb/test/src/NDBT_Test.cpp	2011-12-16 14:43:13 +0000
+++ b/storage/ndb/test/src/NDBT_Test.cpp	2012-07-05 11:19:04 +0000
@@ -1398,7 +1398,7 @@ int NDBT_TestSuite::execute(int argc, co
 
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
 
-  load_defaults("my",load_default_groups,&argc,&_argv);
+  ndb_load_defaults(NULL, load_default_groups,&argc,&_argv);
 
   int ho_error;
 #ifndef DBUG_OFF

=== modified file 'storage/ndb/test/tools/connect.cpp'
--- a/storage/ndb/test/tools/connect.cpp	2012-04-23 08:11:54 +0000
+++ b/storage/ndb/test/tools/connect.cpp	2012-07-05 11:19:04 +0000
@@ -55,7 +55,7 @@ int main(int argc, char** argv){
   NDB_INIT(argv[0]);
 
   const char *load_default_groups[]= { "mysql_cluster",0 };
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL, load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_connect.trace";

=== modified file 'storage/ndb/test/tools/hugoJoin.cpp'
--- a/storage/ndb/test/tools/hugoJoin.cpp	2011-09-28 09:54:05 +0000
+++ b/storage/ndb/test/tools/hugoJoin.cpp	2012-07-05 11:19:04 +0000
@@ -19,13 +19,8 @@
 #include <ndb_global.h>
 #include <ndb_opts.h>
 
-#include <my_sys.h>
-#include <my_getopt.h>
-#include <mysql_version.h>
-
 #include <NdbOut.hpp>
 #include <NdbApi.hpp>
-#include <NdbSleep.h>
 #include <NDBT.hpp>
 #include <HugoTransactions.hpp>
 #include <HugoQueryBuilder.hpp>
@@ -93,7 +88,7 @@ static void usage()
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my", load_default_groups, &argc, &argv);
+  ndb_load_defaults(NULL, load_default_groups, &argc, &argv);
   int ho_error;
   if ((ho_error=handle_options(&argc, &argv, my_long_options,
 			       ndb_std_get_one_option)))

=== modified file 'storage/ndb/test/tools/log_listner.cpp'
--- a/storage/ndb/test/tools/log_listner.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/tools/log_listner.cpp	2012-07-05 11:19:04 +0000
@@ -47,7 +47,7 @@ main(int argc, char** argv)
 {
   NDB_INIT(argv[0]);
   const char *load_default_groups[]= { "mysql_cluster",0 };
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/eventlog.trace";

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (magnus.blaudd:4587 to 4588) magnus.blaudd6 Jul