summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--cmake/build_configurations/mysql_release.cmake10
-rw-r--r--include/mysql_version.h.in2
-rw-r--r--libmysqld/CMakeLists.txt3
-rw-r--r--mysys/my_gethwaddr.c3
-rw-r--r--storage/xtradb/CMakeLists.txt16
6 files changed, 27 insertions, 9 deletions
diff --git a/VERSION b/VERSION
index 2b05cbd2d34..7bac52ecdfb 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=18
-MYSQL_VERSION_EXTRA=-MariaDB
+MYSQL_VERSION_EXTRA=
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index ee6d6b85004..53157b4e2c0 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -115,9 +115,9 @@ IF(UNIX)
OPTION(WITH_LIBEDIT "" ON)
ENDIF()
- OPTION(WITH_PIC "" ON) # Why?
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+
IF(NOT IGNORE_AIO_CHECK)
# Ensure aio is available on Linux (required by InnoDB)
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
@@ -133,6 +133,14 @@ IF(UNIX)
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
")
ENDIF()
+
+ # Remove libaio dependency from mysqld
+ SET(XTRADB_PREFER_STATIC_LIBAIO 1)
+
+ # Unfortunately, linking shared libmysqld with static aio
+ # does not work, unless we add also dynamic one. This also means
+ # libmysqld.so will depend on libaio.so
+ SET(LIBMYSQLD_SO_EXTRA_LIBS aio)
ENDIF()
# Enable fast mutexes on Linux
diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in
index c37e99d7a8c..18c61040c22 100644
--- a/include/mysql_version.h.in
+++ b/include/mysql_version.h.in
@@ -9,7 +9,7 @@
#include <custom_conf.h>
#else
#define PROTOCOL_VERSION @PROTOCOL_VERSION@
-#define MYSQL_SERVER_VERSION "@VERSION@"
+#define MYSQL_SERVER_VERSION "@VERSION@-MariaDB"
#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
#define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@"
#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 3ced8de401d..6eb62b953a3 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -158,6 +158,9 @@ IF(NOT DISABLE_SHARED)
# libmysqld
SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ IF(LIBMYSQLD_SO_EXTRA_LIBS)
+ TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS})
+ ENDIF()
ENDIF()
ENDIF()
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c
index 4360daca6f8..21bbdfef997 100644
--- a/mysys/my_gethwaddr.c
+++ b/mysys/my_gethwaddr.c
@@ -129,6 +129,7 @@ err:
#elif defined(_WIN32)
#include <winsock2.h>
#include <iphlpapi.h>
+#pragma comment(lib, "iphlpapi.lib")
#define ETHER_ADDR_LEN 6
@@ -142,7 +143,7 @@ my_bool my_gethwaddr(uchar *to)
if (GetAdaptersInfo(info, &info_len) != ERROR_BUFFER_OVERFLOW)
goto err;
- info= alloca(info_len);
+ info= (IP_ADAPTER_INFO *)alloca(info_len);
if (GetAdaptersInfo(info, &info_len) != NO_ERROR)
goto err;
diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt
index b55f31e08d1..044a259c65d 100644
--- a/storage/xtradb/CMakeLists.txt
+++ b/storage/xtradb/CMakeLists.txt
@@ -23,12 +23,18 @@ INCLUDE(CheckCSourceRuns)
IF(UNIX)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
CHECK_INCLUDE_FILES (libaio.h HAVE_LIBAIO_H)
- CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
- ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
- IF(HAVE_LIBAIO_H AND HAVE_LIBAIO)
- ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
- LINK_LIBRARIES(aio)
+ IF (XTRADB_PREFER_STATIC_LIBAIO)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ ENDIF()
+ FIND_LIBRARY(AIO_LIBRARY aio)
+ IF(AIO_LIBRARY)
+ CHECK_LIBRARY_EXISTS(${AIO_LIBRARY} io_queue_init "" HAVE_LIBAIO)
+ IF(HAVE_LIBAIO AND HAVE_LIBAIO_H)
+ ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
+ ENDIF()
+ LINK_LIBRARIES(${AIO_LIBRARY})
ENDIF()
+ ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE")
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")