#At file:///home/frazer/bzr/mysql-5.1-telco-7.1/
3049 Frazer Clement 2009-10-02 [merge]
Merge 7.0->7.1
removed:
config.cmake
modified:
CMakeLists.txt
Makefile.am
client/client_priv.h
include/my_sys.h
include/mysql_embed.h
libmysqld/CMakeLists.txt
sql/CMakeLists.txt
sql/ha_ndbcluster_cond.cc
sql/hostname.cc
storage/innodb_plugin/CMakeLists.txt
storage/mysql_storage_engine.cmake
storage/ndb/CMakeLists.txt
storage/ndb/include/CMakeLists.txt
storage/ndb/test/ndbapi/testMgm.cpp
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt 2009-10-01 12:30:13 +0000
+++ b/CMakeLists.txt 2009-10-02 18:43:35 +0000
@@ -1,18 +1,17 @@
# Copyright (C) 2006 MySQL AB
-# All rights reserved. Use is subject to license terms.
-#
+#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
IF(COMMAND cmake_policy)
@@ -20,13 +19,9 @@ IF(COMMAND cmake_policy)
ENDIF(COMMAND cmake_policy)
PROJECT(MySql)
-INCLUDE(config.cmake)
-if(COMMAND cmake_policy)
- cmake_policy(SET CMP0003 NEW)
-endif(COMMAND cmake_policy)
# This reads user configuration, generated by configure.js.
-INCLUDE(win/configure.data OPTIONAL)
+INCLUDE(win/configure.data)
# Hardcode support for CSV storage engine
SET(WITH_CSV_STORAGE_ENGINE TRUE)
@@ -50,27 +45,6 @@ ADD_DEFINITIONS(-DHAVE_IPV6)
# Set debug options
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- ADD_DEFINITIONS(-DHAVE_NDBCLUSTER_DB)
- ADD_DEFINITIONS(-DWITH_NDBCLUSTER_STORAGE_ENGINE)
- SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_ndbcluster_plugin")
- SET (NDB_CLIENT_INCLUDES
- ${CMAKE_SOURCE_DIR}/storage/ndb/include
- ${CMAKE_SOURCE_DIR}/storage/ndb/include/util
- ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi
- ${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib
- )
- SET (NDB_HANDLER_SRC
- ha_ndbcluster.cc ha_ndbcluster_cond.cc ha_ndbinfo.cc
- ha_ndbcluster_connection.cc ha_ndbcluster_binlog.cc
- )
- IF(WITH_NDB_BINLOG)
- ADD_DEFINITIONS(-DWITH_NDB_BINLOG)
- ENDIF(WITH_NDB_BINLOG)
-ELSE(WITH_NDBCLUSTER_STORAGE_ENGINE)
- SET (NDB_CLIENT_INCLUDES "")
- SET (NDB_HANDLER_SRC "")
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
SET(localstatedir "C:\\mysql\\data")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
@@ -169,17 +143,6 @@ IF(WIN32)
ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
ENDIF(WIN32)
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
- # Fool zlib on Win32 with VS9
- # It just includes config.h, which we don't have on win32.. so we have to
- # do it here alongside config-win.h.
- ADD_DEFINITIONS("-DHAVE_VSNPRINTF")
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
-
-# I Have no idea why this is needed, but it seems to be to build on pb
-# hosts, but not on other machines. Welcome to the 'joy' of Windows....
-ADD_DEFINITIONS("-DHAVE_STRTOUL")
-
# default to x86 platform. We'll check for X64 in a bit
SET (PLATFORM X86)
@@ -251,12 +214,16 @@ ENDIF(WITHOUT_DYNAMIC_PLUGINS)
FILE(GLOB STORAGE_SUBDIRS storage/*)
FOREACH(SUBDIR ${STORAGE_SUBDIRS})
FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/storage ${SUBDIR})
- STRING(TOUPPER ${DIRNAME} ENGINE)
- STRING(TOLOWER ${DIRNAME} ENGINE_LOWER)
IF (EXISTS ${SUBDIR}/CMakeLists.txt)
# Check MYSQL_STORAGE_ENGINE macro is present
FILE(STRINGS ${SUBDIR}/CMakeLists.txt HAVE_STORAGE_ENGINE REGEX MYSQL_STORAGE_ENGINE)
IF(HAVE_STORAGE_ENGINE)
+ # Extract name of engine from HAVE_STORAGE_ENGINE
+ STRING(REGEX REPLACE ".*MYSQL_STORAGE_ENGINE\\((.*\)\\).*"
+ "\\1" ENGINE_NAME ${HAVE_STORAGE_ENGINE})
+ STRING(TOUPPER ${ENGINE_NAME} ENGINE)
+ STRING(TOLOWER ${ENGINE_NAME} ENGINE_LOWER)
+
SET(ENGINE_BUILD_TYPE "DYNAMIC")
# Read plug.in to find out if a plugin is mandatory and whether it supports
# build as shared library (dynamic).
@@ -330,9 +297,6 @@ ADD_SUBDIRECTORY(extra/yassl)
ADD_SUBDIRECTORY(extra/yassl/taocrypt)
ADD_SUBDIRECTORY(extra)
ADD_SUBDIRECTORY(client)
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- ADD_SUBDIRECTORY(storage/ndb)
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
ADD_SUBDIRECTORY(sql)
ADD_SUBDIRECTORY(server-tools/instance-manager)
ADD_SUBDIRECTORY(libmysql)
=== modified file 'Makefile.am'
--- a/Makefile.am 2009-08-26 13:25:41 +0000
+++ b/Makefile.am 2009-10-02 16:33:50 +0000
@@ -20,8 +20,7 @@ AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
- README COPYING EXCEPTIONS-CLIENT CMakeLists.txt \
- config.cmake
+ README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@readline_topdir@ sql-common scripts \
=== modified file 'client/client_priv.h'
--- a/client/client_priv.h 2009-05-27 12:11:46 +0000
+++ b/client/client_priv.h 2009-10-02 14:55:18 +0000
@@ -54,9 +54,6 @@ enum options_client
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG,
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
-#ifdef HAVE_NDBCLUSTER_DB
- OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
-#endif
OPT_TRIGGERS,
OPT_MYSQL_ONLY_PRINT,
OPT_MYSQL_LOCK_DIRECTORY,
=== removed file 'config.cmake'
--- a/config.cmake 2008-09-04 05:47:01 +0000
+++ b/config.cmake 1970-01-01 00:00:00 +0000
@@ -1,116 +0,0 @@
-# Copyright (C) 2007 MySQL AB
-#
-# 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
-
-FILE(READ "configure.in" CONFIGURE_IN)
-
-STRING(REGEX REPLACE ".*AM_INIT_AUTOMAKE\\(mysql, ([^)]+)\\).*"
- "\\1" PARSE_VERSION "${CONFIGURE_IN}")
-
-STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
- "\\1.\\2" PARSE_BASE_VERSION "${PARSE_VERSION}")
-STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
- "\\1" PARSE_VERSION_MAJOR "${PARSE_VERSION}")
-STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
- "\\2" PARSE_VERSION_MINOR "${PARSE_VERSION}")
-STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
- "\\3" PARSE_VERSION_BUILD "${PARSE_VERSION}")
-IF(PARSE_VERSION_MINOR LESS 10)
- SET(PARSE_VERSION_ID "${PARSE_VERSION_MAJOR}0${PARSE_VERSION_MINOR}")
-ELSE(PARSE_VERSION_MINOR LESS 10)
- SET(PARSE_VERSION_ID "${PARSE_VERSION_MAJOR}${PARSE_VERSION_MINOR}")
-ENDIF(PARSE_VERSION_MINOR LESS 10)
-IF(PARSE_VERSION_BUILD LESS 10)
- SET(PARSE_VERSION_ID "${PARSE_VERSION_ID}0${PARSE_VERSION_BUILD}")
-ELSE(PARSE_VERSION_BUILD LESS 10)
- SET(PARSE_VERSION_ID "${PARSE_VERSION_ID}${PARSE_VERSION_BUILD}")
-ENDIF(PARSE_VERSION_BUILD LESS 10)
-
-STRING(REGEX REPLACE "[^-]+-[^-]+-(.+)"
- "\\1" PARSE_NDB_VERSION "${PARSE_VERSION}")
-STRING(REGEX REPLACE "(.+\\..+).+"
- "\\1" PARSE_NDB_BASE_VERSION "${PARSE_NDB_VERSION}")
-STRING(REGEX REPLACE "([0-9]+).+"
- "\\1" PARSE_NDB_VERSION_MAJOR "${PARSE_NDB_VERSION}")
-STRING(REGEX REPLACE "[0-9]+\\.([0-9]+).*"
- "\\1" PARSE_NDB_VERSION_MINOR "${PARSE_NDB_VERSION}")
-STRING(REGEX REPLACE ".+\\..+\\.([0-9]+).*"
- "\\1" PARSE_NDB_VERSION_BUILD "${PARSE_NDB_VERSION}")
-
-STRING(REGEX REPLACE ".*PROTOCOL_VERSION=([0-9]+).*"
- "\\1" PARSE_PROTOCOL "${CONFIGURE_IN}")
-STRING(REGEX REPLACE ".*DOT_FRM_VERSION=([0-9]+).*"
- "\\1" PARSE_FRM_VERSION "${CONFIGURE_IN}")
-STRING(REGEX REPLACE ".*MYSQL_TCP_PORT_DEFAULT=([0-9]+).*"
- "\\1" PARSE_TCP_PORT "${CONFIGURE_IN}")
-STRING(REGEX REPLACE ".*MYSQL_UNIX_ADDR_DEFAULT=\"([^\"]+)\".*"
- "\\1" PARSE_UNIX_ADDR "${CONFIGURE_IN}")
-
-# Set some constant values
-SET(PROTOCOL_VERSION "${PARSE_PROTOCOL}" CACHE STRING
- "MySQL Protocol Version" FORCE)
-SET(DOT_FRM_VERSION "${PARSE_FRM_VERSION}" CACHE STRING
- "MySQL FRM Version" FORCE)
-SET(MYSQL_TCP_PORT_DEFAULT "${PARSE_TCP_PORT}" CACHE STRING
- "Default port for TCP connections" FORCE)
-SET(MYSQL_UNIX_ADDR_DEFAULT "${PARSE_UNIX_ADDR}" CACHE STRING
- "Default path for PIPE connections" FORCE)
-SET(VERSION "${PARSE_VERSION}" CACHE STRING
- "MySQL version" FORCE)
-SET(MYSQL_BASE_VERSION "${PARSE_BASE_VERSION}" CACHE STRING
- "Base MySQL version" FORCE)
-SET(MYSQL_VERSION_ID "${PARSE_VERSION_ID}" CACHE STRING
- "MySQL version identifier" FORCE)
-
-
-# Set some default configuration values
-SET(MYSQL_SERVER_SUFFIX "" CACHE STRING
- "MySQL Server suffix")
-SET(COMPILATION_COMMENT "Source distribution" CACHE STRING
- "Source compilation comment")
-SET(MYSQL_TCP_PORT "${MYSQL_TCP_PORT_DEFAULT}" CACHE STRING
- "Port for TCP connections")
-SET(MYSQL_UNIX_ADDR "${MYSQL_UNIX_ADDR_DEFAULT}" CACHE STRING
- "Path for PIPE connections")
-
-SET(__NT__ TRUE CACHE BOOL "Target for Windows NT operating systems")
-
-SET(EMBED_MANIFESTS FALSE CACHE BOOL "Embed manifests")
-SET(DISABLE_GRANT_OPTIONS FALSE CACHE BOOL "Disable grant options")
-
-SET(WITH_ARCHIVE_STORAGE_ENGINE FALSE CACHE BOOL "Include Archive engine")
-SET(WITH_BLACKHOLE_STORAGE_ENGINE FALSE CACHE BOOL "Include Blackhole engine")
-SET(WITH_EXAMPLE_STORAGE_ENGINE FALSE CACHE BOOL "Include Example engine")
-SET(WITH_FEDERATED_STORAGE_ENGINE FALSE CACHE BOOL "Include Federated")
-SET(WITH_INNOBASE_STORAGE_ENGINE FALSE CACHE BOOL "Include InnoDB engine")
-SET(WITH_PARTITION_STORAGE_ENGINE FALSE CACHE BOOL "Include Table partitioning")
-SET(WITH_NDBCLUSTER_STORAGE_ENGINE FALSE CACHE BOOL "Include NDB Cluster")
-SET(WITH_EMBEDDED_SERVER FALSE CACHE BOOL "Include embedded server (libmysqld)")
-
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- SET(WITH_PARTITION_STORAGE_ENGINE TRUE)
- SET(WITH_NDB_BINLOG TRUE)
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
-
-SET(NDB_SCI_INCLUDES "" CACHE STRING "")
-SET(NDB_SCI_LIBS "" CACHE STRING "")
-SET(NDB_TEST TRUE CACHE BOOL "Include the NDB Cluster ndbapi test programs")
-SET(ndb_port "1186" CACHE STRING "Port for NDB Cluster management server")
-SET(ndb_port_base "default" CACHE STRING "Base port for NDB Cluster transporters")
-SET(NDB_MYSQL_VERSION_MAJOR "${PARSE_VERSION_MAJOR}" CACHE STRING "NDB MySQL Major Version" FORCE)
-SET(NDB_MYSQL_VERSION_MINOR "${PARSE_VERSION_MINOR}" CACHE STRING "NDB MySQL Minor Version" FORCE)
-SET(NDB_MYSQL_VERSION_BUILD "${PARSE_VERSION_BUILD}" CACHE STRING "NDB MySQL Build Version" FORCE)
-SET(NDB_VERSION_MAJOR "${PARSE_NDB_VERSION_MAJOR}" CACHE STRING "NDB Major Version" FORCE)
-SET(NDB_VERSION_MINOR "${PARSE_NDB_VERSION_MINOR}" CACHE STRING "NDB Minor Version" FORCE)
-SET(NDB_VERSION_BUILD "${PARSE_NDB_VERSION_BUILD}" CACHE STRING "NDB Build Version" FORCE)
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2009-10-01 07:16:52 +0000
+++ b/include/my_sys.h 2009-10-02 15:06:00 +0000
@@ -33,7 +33,7 @@ extern int NEAR my_errno; /* Last error
#else
#include <my_pthread.h>
#endif
-#define HEPP
+
#include <m_ctype.h> /* for CHARSET_INFO */
#include <stdarg.h>
#include <typelib.h>
=== modified file 'include/mysql_embed.h'
--- a/include/mysql_embed.h 2009-05-26 18:53:34 +0000
+++ b/include/mysql_embed.h 2009-10-02 14:55:18 +0000
@@ -26,7 +26,6 @@
#undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_OPENSSL
#undef HAVE_SMEM /* No shared memory */
-#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
#define DONT_USE_RAID
=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt 2009-10-01 07:16:52 +0000
+++ b/libmysqld/CMakeLists.txt 2009-10-02 16:13:41 +0000
@@ -1,22 +1,27 @@
# Copyright (C) 2006 MySQL AB
-# All rights reserved. Use is subject to license terms.
-#
+#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+# Need to set USE_TLS, since __declspec(thread) approach to thread local
+# storage does not work properly in DLLs.
+IF(WIN32)
+ ADD_DEFINITIONS(-DUSE_TLS)
+ENDIF(WIN32)
+
ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY -DHAVE_DLOPEN)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
@@ -45,6 +50,12 @@ FOREACH(rpath ${ZLIB_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../zlib/${rpath})
ENDFOREACH(rpath)
+# FIXME only needed if build type is "Debug", but CMAKE_BUILD_TYPE is
+# not set during configure time.
+INCLUDE(${CMAKE_SOURCE_DIR}/dbug/CMakeLists.txt)
+FOREACH(rpath ${DBUG_SOURCES})
+ SET(LIB_SOURCES ${LIB_SOURCES} ../dbug/${rpath})
+ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/CMakeLists.txt)
FOREACH(rpath ${TAOCRYPT_SOURCES})
@@ -56,11 +67,21 @@ FOREACH(rpath ${YASSL_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/${rpath})
ENDFOREACH(rpath)
+INCLUDE(${CMAKE_SOURCE_DIR}/strings/CMakeLists.txt)
+FOREACH(rpath ${STRINGS_SOURCES})
+ SET(LIB_SOURCES ${LIB_SOURCES} ../strings/${rpath})
+ENDFOREACH(rpath)
+
INCLUDE(${CMAKE_SOURCE_DIR}/regex/CMakeLists.txt)
FOREACH(rpath ${REGEX_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../regex/${rpath})
ENDFOREACH(rpath)
+INCLUDE(${CMAKE_SOURCE_DIR}/mysys/CMakeLists.txt)
+FOREACH(rpath ${MYSYS_SOURCES})
+ SET(LIB_SOURCES ${LIB_SOURCES} ../mysys/${rpath})
+ENDFOREACH(rpath)
+
INCLUDE(${CMAKE_SOURCE_DIR}/vio/CMakeLists.txt)
FOREACH(rpath ${VIO_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../vio/${rpath})
@@ -77,12 +98,6 @@ FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGI
ENDFOREACH(ENGINE_LIB)
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- FOREACH(rpath ${NDB_HANDLER_SRC})
- SET(LIB_SOURCES ${LIB_SOURCES} ../sql/${rpath})
- ENDFOREACH(rpath)
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
-
SET(SOURCE_SUBLIBS FALSE)
SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
@@ -139,15 +154,6 @@ ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQ
ADD_DEPENDENCIES(mysqlserver GenServerSource GenError)
TARGET_LINK_LIBRARIES(mysqlserver)
-ADD_DEPENDENCIES(mysqlserver mysys)
-TARGET_LINK_LIBRARIES(mysqlserver mysys)
-
ADD_LIBRARY(libmysqld SHARED cmake_dummy.c libmysqld.def)
ADD_DEPENDENCIES(libmysqld mysqlserver)
TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32)
-
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- ADD_DEPENDENCIES(libmysqld ndbclient)
- TARGET_LINK_LIBRARIES(libmysqld ndbclient)
- INCLUDE_DIRECTORIES(${NDB_CLIENT_INCLUDES})
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt 2009-10-01 07:16:52 +0000
+++ b/sql/CMakeLists.txt 2009-10-02 16:13:41 +0000
@@ -1,18 +1,17 @@
# Copyright (C) 2006 MySQL AB
-# All rights reserved. Use is subject to license terms.
-#
+#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG
@@ -40,16 +39,12 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOUR
ADD_DEFINITIONS(-DMYSQL_SERVER -D_CONSOLE -DHAVE_DLOPEN -DHAVE_EVENT_SCHEDULER)
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- INCLUDE_DIRECTORIES(${NDB_CLIENT_INCLUDES})
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
SET (SQL_SOURCE
../sql-common/client.c derror.cc des_key_file.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
filesort.cc gstream.cc
ha_partition.cc
- ${NDB_HANDLER_SRC}
handler.cc hash_filo.cc hash_filo.h
hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc
item_create.cc item_func.cc item_geofunc.cc item_row.cc
@@ -96,10 +91,6 @@ ENDIF (NOT EXISTS cmake_dummy.cc)
ADD_EXECUTABLE(mysqld cmake_dummy.cc)
SET_TARGET_PROPERTIES(mysqld PROPERTIES OUTPUT_NAME mysqld${MYSQLD_EXE_SUFFIX})
-IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
- TARGET_LINK_LIBRARIES(mysqld ndbclient)
-ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
-
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE)
SET (MYSQLD_CORE_LIBS mysys zlib dbug strings yassl taocrypt vio regex sql)
=== modified file 'sql/ha_ndbcluster_cond.cc'
--- a/sql/ha_ndbcluster_cond.cc 2009-05-27 12:11:46 +0000
+++ b/sql/ha_ndbcluster_cond.cc 2009-10-02 14:55:18 +0000
@@ -1474,4 +1474,4 @@ int ha_ndbcluster_cond::generate_scan_fi
DBUG_RETURN(0);
}
-#endif /* HAVE_NDBCLUSTER_DB */
+#endif
=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc 2009-08-11 15:56:39 +0000
+++ b/sql/hostname.cc 2009-10-02 18:32:45 +0000
@@ -375,7 +375,7 @@ bool ip_to_hostname(struct sockaddr_stor
"no reverse address mapping.",
(const char *) ip_key);
- bool err_status= add_hostname(ip_key, NULL);
+ err_status= add_hostname(ip_key, NULL);
*hostname= NULL;
*connect_errors= 0; /* New IP added to the cache. */
@@ -430,7 +430,7 @@ bool ip_to_hostname(struct sockaddr_stor
(const char *) ip_key,
(const char *) hostname_buffer);
- bool err_status= add_hostname(ip_key, NULL);
+ err_status= add_hostname(ip_key, NULL);
*hostname= NULL;
*connect_errors= 0; /* New IP added to the cache. */
@@ -461,7 +461,7 @@ bool ip_to_hostname(struct sockaddr_stor
that attempted to connect during the outage) unable to connect
indefinitely.
*/
- bool err_status= add_hostname(ip_key, NULL);
+ err_status= add_hostname(ip_key, NULL);
*hostname= NULL;
*connect_errors= 0; /* New IP added to the cache. */
@@ -485,8 +485,9 @@ bool ip_to_hostname(struct sockaddr_stor
{
char ip_buffer[HOST_ENTRY_KEY_SIZE];
- vio_get_normalized_ip_string(addr_info->ai_addr, addr_info->ai_addrlen,
- ip_buffer, sizeof(ip_buffer));
+ err_status=
+ vio_get_normalized_ip_string(addr_info->ai_addr, addr_info->ai_addrlen,
+ ip_buffer, sizeof(ip_buffer));
DBUG_ASSERT(!err_status);
DBUG_PRINT("info", (" - '%s'", (const char*) ip_buffer));
@@ -525,9 +526,10 @@ bool ip_to_hostname(struct sockaddr_stor
{
char ip_buffer[HOST_ENTRY_KEY_SIZE];
- vio_get_normalized_ip_string(addr_info->ai_addr, addr_info->ai_addrlen,
- ip_buffer, sizeof(ip_buffer));
- DBUG_ASSERT(err_status);
+ err_status=
+ vio_get_normalized_ip_string(addr_info->ai_addr, addr_info->ai_addrlen,
+ ip_buffer, sizeof(ip_buffer));
+ DBUG_ASSERT(!err_status);
sql_print_information(" - %s\n", (const char *) ip_buffer);
}
=== modified file 'storage/innodb_plugin/CMakeLists.txt'
--- a/storage/innodb_plugin/CMakeLists.txt 2009-07-30 12:42:56 +0000
+++ b/storage/innodb_plugin/CMakeLists.txt 2009-10-02 16:13:41 +0000
@@ -75,4 +75,5 @@ SET(INNODB_PLUGIN_SOURCES btr/btr0btr.c
ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c
ut/ut0list.c ut/ut0wqueue.c)
ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DINNODB_RW_LOCKS_USE_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION)
-MYSQL_STORAGE_ENGINE(INNODB_PLUGIN)
\ No newline at end of file
+# Disable for now
+# MYSQL_STORAGE_ENGINE(INNODB_PLUGIN)
=== modified file 'storage/mysql_storage_engine.cmake'
--- a/storage/mysql_storage_engine.cmake 2009-06-10 08:59:49 +0000
+++ b/storage/mysql_storage_engine.cmake 2009-10-02 16:13:41 +0000
@@ -7,6 +7,7 @@
# Remarks:
# ${engine}_SOURCES variable containing source files to produce the library must set before
# calling this macro
+# ${engine}_LIBS variable containing extra libraries to link with may be set
MACRO(MYSQL_STORAGE_ENGINE engine)
IF(NOT SOURCE_SUBLIBS)
@@ -21,6 +22,9 @@ IF(NOT SOURCE_SUBLIBS)
ADD_DEFINITIONS(-DWITH_${engine}_STORAGE_ENGINE -DMYSQL_SERVER)
#Create static library. The name of the library is <storage_engine>.lib
ADD_LIBRARY(${libname} ${${engine}_SOURCES})
+ IF(${engine}_LIBS)
+ TARGET_LINK_LIBRARIES(${libname} ${${engine}_LIBS})
+ ENDIF(${engine}_LIBS)
ADD_DEPENDENCIES(${libname} GenError)
MESSAGE("build ${engine} as static library")
ELSEIF(${ENGINE_BUILD_TYPE} STREQUAL "DYNAMIC")
@@ -30,6 +34,9 @@ IF(NOT SOURCE_SUBLIBS)
SET(dyn_libname ha_${libname})
ADD_LIBRARY(${dyn_libname} SHARED ${${engine}_SOURCES})
TARGET_LINK_LIBRARIES (${dyn_libname} mysqld)
+ IF(${engine}_LIBS)
+ TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS})
+ ENDIF(${engine}_LIBS)
MESSAGE("build ${engine} as DLL")
ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
ENDIF(NOT SOURCE_SUBLIBS)
=== modified file 'storage/ndb/CMakeLists.txt'
--- a/storage/ndb/CMakeLists.txt 2008-10-09 09:40:16 +0000
+++ b/storage/ndb/CMakeLists.txt 2009-10-02 16:13:41 +0000
@@ -28,3 +28,18 @@ ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(docs)
+
+IF(WITHOUT_PARTITION_STORAGE_ENGINE)
+ MESSAGE(FATAL_ERROR "NDBCLUSTER can't be compiled without PARTITION")
+ENDIF(WITHOUT_PARTITION_STORAGE_ENGINE)
+
+INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/ndb/include)
+SET(NDBCLUSTER_SOURCES
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster_cond.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster_connection.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster_binlog.cc)
+SET(NDBCLUSTER_LIBS ndbclient)
+ADD_DEFINITIONS(-DWITH_NDB_BINLOG)
+MYSQL_STORAGE_ENGINE(NDBCLUSTER)
=== modified file 'storage/ndb/include/CMakeLists.txt'
--- a/storage/ndb/include/CMakeLists.txt 2008-08-20 13:22:09 +0000
+++ b/storage/ndb/include/CMakeLists.txt 2009-10-02 16:13:41 +0000
@@ -13,6 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# Check the size of our types and configure ndb_types.h
INCLUDE(CheckTypeSize)
CHECK_TYPE_SIZE(char NDB_SIZEOF_CHAR)
CHECK_TYPE_SIZE(short NDB_SIZEOF_SHORT)
@@ -20,14 +21,64 @@ CHECK_TYPE_SIZE(int NDB_SIZEOF_INT)
CHECK_TYPE_SIZE(long NDB_SIZEOF_LONG)
CHECK_TYPE_SIZE("char*" NDB_SIZEOF_CHARP)
CHECK_TYPE_SIZE("long long" NDB_SIZEOF_LONG_LONG)
-
-
-CONFIGURE_FILE(ndb_global.h.in
- ${CMAKE_CURRENT_SOURCE_DIR}/ndb_global.h
- @ONLY)
CONFIGURE_FILE(ndb_types.h.in
${CMAKE_CURRENT_SOURCE_DIR}/ndb_types.h
@ONLY)
+
+# Split VERSION(mysql-5.1.37-xxx) into NDB_MYSQL_VERSION_XXX with
+# one variable for minor, major and build
+
+# NDB_MYSQL_VERSION_MAJOR
+STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
+ "\\1" PARSE_VERSION_MAJOR "${VERSION}")
+SET(NDB_MYSQL_VERSION_MAJOR "${PARSE_VERSION_MAJOR}" CACHE STRING "NDB MySQL Major Version" FORCE)
+
+# NDB_MYSQL_VERSION_MINOR
+STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
+ "\\2" PARSE_VERSION_MINOR "${VERSION}")
+SET(NDB_MYSQL_VERSION_MINOR "${PARSE_VERSION_MINOR}" CACHE STRING "NDB MySQL Minor Version" FORCE)
+
+# NDB_MYSQL_VERSION_BUILD
+STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)"
+ "\\3" PARSE_VERSION_BUILD "${VERSION}")
+SET(NDB_MYSQL_VERSION_BUILD "${PARSE_VERSION_BUILD}" CACHE STRING "NDB MySQL Build Version" FORCE)
+
+#
+# Read configure.in and extract the NDB_VERSION_XX=YY variables
+#
+FILE(READ "${CMAKE_SOURCE_DIR}/configure.in" CONFIGURE_IN)
+
+# NDB_VERSION_MAJOR
+STRING(REGEX REPLACE ".*NDB_VERSION_MAJOR=([0-9]+).*"
+ "\\1" PARSE_NDB_VERSION_MAJOR "${CONFIGURE_IN}")
+SET(NDB_VERSION_MAJOR "${PARSE_NDB_VERSION_MAJOR}" CACHE STRING "NDB Major Version" FORCE)
+
+# NDB_VERSION_MINOR
+STRING(REGEX REPLACE ".*NDB_VERSION_MINOR=([0-9]+).*"
+ "\\1" PARSE_NDB_VERSION_MINOR "${CONFIGURE_IN}")
+SET(NDB_VERSION_MINOR "${PARSE_NDB_VERSION_MINOR}" CACHE STRING "NDB Minor Version" FORCE)
+
+# NDB_VERSION_BUILD
+STRING(REGEX REPLACE ".*NDB_VERSION_BUILD=([0-9]+).*"
+ "\\1" PARSE_NDB_VERSION_BUILD "${CONFIGURE_IN}")
+SET(NDB_VERSION_BUILD "${PARSE_NDB_VERSION_BUILD}" CACHE STRING "NDB Build Version" FORCE)
+
+# NDB_VERSION_STATUS
+STRING(REGEX REPLACE ".*NDB_VERSION_STATUS=\"([^\"]+)\".*"
+ "\\1" PARSE_NDB_VERSION_STATUS "${CONFIGURE_IN}")
+SET(NDB_VERSION_STATUS "${NDB_VERSION_STATUS}" CACHE STRING "NDB Staus Version" FORCE)
+
+# Create ndb_version.h
CONFIGURE_FILE(ndb_version.h.in
${CMAKE_CURRENT_SOURCE_DIR}/ndb_version.h
@ONLY)
+
+#
+# Create ndb_global.h
+#
+SET(ndb_port "1186" CACHE STRING "Port for NDB Cluster management server")
+SET(ndb_port_base "default" CACHE STRING "Base port for NDB Cluster transporters")
+CONFIGURE_FILE(ndb_global.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/ndb_global.h
+ @ONLY)
+
=== modified file 'storage/ndb/test/ndbapi/testMgm.cpp'
--- a/storage/ndb/test/ndbapi/testMgm.cpp 2009-09-27 15:33:01 +0000
+++ b/storage/ndb/test/ndbapi/testMgm.cpp 2009-10-02 18:43:35 +0000
@@ -113,7 +113,7 @@ int runTestApiConnectTimeout(NDBT_Contex
}
return NDBT_OK;
}
-// Small test
+
int runTestApiTimeoutBasic(NDBT_Context* ctx, NDBT_Step* step)
{
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.1 branch (frazer:3049) | Frazer Clement | 2 Oct |