From: magnus.blaudd Date: November 3 2012 8:22am Subject: bzr push into mysql-trunk-cluster branch (magnus.blaudd:3551 to 3552) List-Archive: http://lists.mysql.com/commits/145140 Message-Id: <20121103082239.32078.9103.3552@peek02.se.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3552 magnus.blaudd@stripped 2012-11-03 [merge] Merge modified: sql/mysqld.cc storage/ndb/CMakeLists.txt storage/ndb/compile-cluster 3551 magnus.blaudd@stripped 2012-11-03 [merge] Merge back trunk -> trunk-cluster merge - Revert everything reverted === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2012-11-03 07:56:30 +0000 +++ b/sql/mysqld.cc 2012-11-03 08:20:34 +0000 @@ -1751,8 +1751,10 @@ bool gtid_server_init() } #ifndef MCP_BUG14798275 +#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE extern int ndbcluster_binlog_end(THD*); #endif +#endif void clean_up(bool print_message) @@ -1773,6 +1775,7 @@ void clean_up(bool print_message) sql_print_information("Binlog end"); ha_binlog_end(current_thd); #ifndef MCP_BUG14798275 +#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE #ifdef EMBEDDED_LIBRARY /* In embedded compile the ha_binlog_end call above is #ifdefed @@ -1787,6 +1790,7 @@ void clean_up(bool print_message) (void)ndbcluster_binlog_end(current_thd); #endif #endif +#endif logger.cleanup_base(); === modified file 'storage/ndb/CMakeLists.txt' --- a/storage/ndb/CMakeLists.txt 2012-05-02 19:09:22 +0000 +++ b/storage/ndb/CMakeLists.txt 2012-11-02 08:50:24 +0000 @@ -19,6 +19,10 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT ${CMAKE_SOURCE_DIR}/storage/ndb/cmake) MESSAGE(STATUS "Using cmake version ${CMAKE_VERSION}") + +OPTION(NDB_DETECT_MYSQL_CLUSTER_BUILD + "Autodetect MySQL Cluster and turn on build of ndbcluster and NDB " ON) +MARK_AS_ADVANCED(NDB_DETECT_MYSQL_CLUSTER_BUILD) # Check if this is MySQL Cluster build i.e the MySQL Server # version string ends in -ndb-Y.Y.Y[-status] @@ -28,8 +32,6 @@ MACRO(NDB_CHECK_MYSQL_CLUSTER version_st SET(mysql_version ${CMAKE_MATCH_1}) SET(cluster_version ${CMAKE_MATCH_2}) - MESSAGE(STATUS "This is MySQL Cluster ${cluster_version}") - # Sanity check that the mysql_version matches precalcuated # values from higher level scripts IF(NOT ${mysql_version} EQUAL "${MYSQL_NO_DASH_VERSION}") @@ -43,9 +45,12 @@ MACRO(NDB_CHECK_MYSQL_CLUSTER version_st SET(MYSQL_CLUSTER_VERSION_BUILD ${CMAKE_MATCH_3}) ENDIF() - # Finally set MYSQL_CLUSTER_VERSION to be used as an indicator - # that this is a MySQL Cluster build, yay! - SET(MYSQL_CLUSTER_VERSION ${cluster_version}) + IF(NDB_DETECT_MYSQL_CLUSTER_BUILD) + MESSAGE(STATUS "This is MySQL Cluster ${cluster_version}") + # Finally set MYSQL_CLUSTER_VERSION to be used as an indicator + # that this is a MySQL Cluster build, yay! + SET(MYSQL_CLUSTER_VERSION ${cluster_version}) + ENDIF() ENDIF() ENDMACRO() === modified file 'storage/ndb/compile-cluster' --- a/storage/ndb/compile-cluster 2012-10-02 12:48:00 +0000 +++ b/storage/ndb/compile-cluster 2012-11-02 08:50:24 +0000 @@ -34,7 +34,7 @@ my $opt_debug; my $opt_build_type; my $opt_build = 1; my $opt_just_print; - +my $opt_vanilla; Getopt::Long::Configure("pass_through"); GetOptions( @@ -45,6 +45,7 @@ GetOptions( 'build!' => \$opt_build, 'c|just-configure' => sub { $opt_build = 0; }, 'n|just-print' => \$opt_just_print, + 'vanilla' => \$opt_vanilla, ) or exit(1); # Find source root directory, assume this script is @@ -98,18 +99,29 @@ if(defined $ENV{"CXXFLAGS"} and $ENV{"CX my @args; - # Hardcoded options controlling how to build MySQL Server - push(@args, "-DWITH_SSL=bundled"); # Consistent error messages - if ($opt_debug) { push(@args, "-DWITH_DEBUG=1"); push(@args, "-DMYSQL_MAINTAINER_MODE=0"); } - # Hardcoded options controlling how to build NDB - push(@args, "-DWITH_PLUGIN_NDBCLUSTER=1"); - push(@args, "-DWITH_NDB_TEST=1"); + if ($opt_vanilla) + { + # Use default options for building + print("compile-cluster: vanilla build requested, no sugar\n"); + + # Turn off autodetect of MySQL Cluster build + push(@args, "-DNDB_DETECT_MYSQL_CLUSTER_BUILD=0"); + } + else + { + # Hardcoded options controlling how to build MySQL Server + push(@args, "-DWITH_SSL=bundled"); # Consistent error messages + + # Hardcoded options controlling how to build NDB + push(@args, "-DWITH_PLUGIN_NDBCLUSTER=1"); + push(@args, "-DWITH_NDB_TEST=1"); + } # The cmake generator to use if ($opt_build_type) No bundle (reason: useless for push emails).