4888 magnus.blaudd@stripped 2012-11-02
Merge in patch for compile-cluster --vanilla
modified:
storage/ndb/CMakeLists.txt
storage/ndb/compile-cluster
4887 Ahmad Abdullateef 2012-11-02
BUG#11763004 - _DOSMAPERR WIPES OUT THE ERRNO SET IN
_OPEN_OSFHANDLE AND GIVES (ERRNO: 2
DESCRIPTION:
When an API or function call fails in mysqld.exe under windows,
Error Logs report Error Code 22 for certain cases.
ANALYSIS :
When an error occurs my_osmaperr() is called with the value
from GetLastError(). The mapping which exists in my_winerr.c
is fairly limited and EINVAL (22) is returned for a lot
Windows Error Codes, which makes it hard to detect the cause
from error Logs.
Reproducing an issue which returns an unmapped Windows Error
Codes is very difficult, hence an test case for this issue hs
intentionally been left out.
FIX :
my_osmaperr() now saves the original GetLastError() value in
thr_winerr. This saved value is used again in my_strerror()
incase the nr value is EINVAL (22) to give a better error
message.
modified:
include/my_pthread.h
mysys/my_error.c
mysys/my_winerr.c
=== modified file 'storage/ndb/CMakeLists.txt'
--- a/storage/ndb/CMakeLists.txt 2012-03-21 14:30:53 +0000
+++ b/storage/ndb/CMakeLists.txt 2012-11-02 09:56:17 +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-04-13 06:59:56 +0000
+++ b/storage/ndb/compile-cluster 2012-11-02 09:56:17 +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
@@ -84,18 +85,29 @@ my $cmake_version_id;
my @args;
- # Hardcoded options controlling how to build MySQL Server
- push(@args, "-DWITH_SSL=bundled");
-
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).
| Thread |
|---|
| • bzr push into mysql-trunk branch (magnus.blaudd:4887 to 4888) | magnus.blaudd | 6 Nov |