[Commits] 720f7ad1776: Merge branch '5.5' into 10.0
revision-id: 720f7ad17762f5c7e17096b883bca626e064bb0d (mariadb-10.0.37-54-g720f7ad1776) parent(s): edeba0c8733409865c3abcab881af0d48b7be94f ad220b96fb01dbb6acf7e51bdd8d4d6362d96ea7 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2019-01-24 12:28:54 +0100 message: Merge branch '5.5' into 10.0 client/mysqltest.cc | 5 +++ cmake/ssl.cmake | 11 +++++- include/my_valgrind.h | 4 +- mysql-test/r/row-checksum-old.result | 16 ++++++++ mysql-test/r/row-checksum.result | 16 ++++++++ mysql-test/r/subselect2.result | 22 +++++++++++ mysql-test/t/row-checksum.test | 17 +++++++++ mysql-test/t/subselect2.test | 20 ++++++++++ scripts/mysql_install_db.sh | 19 +++++++--- sql/CMakeLists.txt | 2 +- sql/log.cc | 6 +-- sql/mysql_install_db.cc | 72 +++++++++++++++++++++++++++++++++--- sql/sql_repl.cc | 6 +-- sql/sql_table.cc | 5 ++- sql/sql_yacc.yy | 22 ++++++----- support-files/mysql.server.sh | 6 ++- unittest/mysys/thr_template.c | 4 +- win/packaging/heidisql.cmake | 2 +- 18 files changed, 219 insertions(+), 36 deletions(-) diff --cc cmake/ssl.cmake index c76e73927c0,60d2cb48387..6985932d165 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@@ -84,121 -62,35 +84,130 @@@ MACRO (MYSQL_CHECK_SSL ENDIF() ENDIF() + # See if WITH_SSL is of the form </path/to/custom/installation> + FILE(GLOB WITH_SSL_HEADER ${WITH_SSL}/include/openssl/ssl.h) + IF (WITH_SSL_HEADER) + SET(WITH_SSL_PATH ${WITH_SSL} CACHE PATH "path to custom SSL installation") + ENDIF() + IF(WITH_SSL STREQUAL "bundled") MYSQL_USE_BUNDLED_SSL() - ELSEIF(WITH_SSL STREQUAL "system" OR WITH_SSL STREQUAL "yes") - # Check for system library - SET(OPENSSL_FIND_QUIETLY TRUE) - INCLUDE(FindOpenSSL) - FIND_LIBRARY(CRYPTO_LIBRARY crypto) - MARK_AS_ADVANCED(CRYPTO_LIBRARY) - INCLUDE(CheckSymbolExists) - INCLUDE(CheckCSourceCompiles) - SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) - SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) - CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h" - HAVE_SHA512_DIGEST_LENGTH) - CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h" - HAVE_ERR_remove_thread_state) - CHECK_C_SOURCE_COMPILES(" - #include <openssl/dh.h> - int main() - { - DH dh; - return sizeof(dh.version); - }" OLD_OPENSSL_API) - SET(CMAKE_REQUIRED_INCLUDES) - SET(CMAKE_REQUIRED_LIBRARIES) + # Reset some variables, in case we switch from /path/to/ssl to "bundled". + IF (WITH_SSL_PATH) + UNSET(WITH_SSL_PATH) + UNSET(WITH_SSL_PATH CACHE) + ENDIF() + IF (OPENSSL_ROOT_DIR) + UNSET(OPENSSL_ROOT_DIR) + UNSET(OPENSSL_ROOT_DIR CACHE) + ENDIF() + IF (OPENSSL_INCLUDE_DIR) + UNSET(OPENSSL_INCLUDE_DIR) + UNSET(OPENSSL_INCLUDE_DIR CACHE) + ENDIF() + IF (WIN32 AND OPENSSL_APPLINK_C) + UNSET(OPENSSL_APPLINK_C) + UNSET(OPENSSL_APPLINK_C CACHE) + ENDIF() + IF (OPENSSL_LIBRARIES) + UNSET(OPENSSL_LIBRARIES) + UNSET(OPENSSL_LIBRARIES CACHE) + ENDIF() + ELSEIF(WITH_SSL STREQUAL "system" OR + WITH_SSL STREQUAL "yes" OR + WITH_SSL_PATH + ) + # First search in WITH_SSL_PATH. + FIND_PATH(OPENSSL_ROOT_DIR + NAMES include/openssl/ssl.h + NO_CMAKE_PATH + NO_CMAKE_ENVIRONMENT_PATH + HINTS ${WITH_SSL_PATH} + ) + # Then search in standard places (if not found above). + FIND_PATH(OPENSSL_ROOT_DIR + NAMES include/openssl/ssl.h + ) + + FIND_PATH(OPENSSL_INCLUDE_DIR + NAMES openssl/ssl.h + HINTS ${OPENSSL_ROOT_DIR}/include + ) + + IF (WIN32) + FIND_FILE(OPENSSL_APPLINK_C + NAMES openssl/applink.c + HINTS ${OPENSSL_ROOT_DIR}/include + ) + MESSAGE(STATUS "OPENSSL_APPLINK_C ${OPENSSL_APPLINK_C}") + ENDIF() + + # On mac this list is <.dylib;.so;.a> + # We prefer static libraries, so we revert it here. + IF (WITH_SSL_PATH) + LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) + ENDIF() + MESSAGE(STATUS "suffixes <${CMAKE_FIND_LIBRARY_SUFFIXES}>") + FIND_LIBRARY(OPENSSL_LIBRARIES + NAMES ssl ssleay32 ssleay32MD + HINTS ${OPENSSL_ROOT_DIR}/lib) + FIND_LIBRARY(CRYPTO_LIBRARY + NAMES crypto libeay32 + HINTS ${OPENSSL_ROOT_DIR}/lib) + IF (WITH_SSL_PATH) + LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) + ENDIF() + + IF(OPENSSL_INCLUDE_DIR AND + OPENSSL_LIBRARIES AND + CRYPTO_LIBRARY + ) + # Verify version number. Version information looks like: + # #define OPENSSL_VERSION_NUMBER 0x1000103fL + # Encoded as MNNFFPPS: major minor fix patch status + FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" + OPENSSL_VERSION_NUMBER + REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*" + ) + STRING(REGEX REPLACE + "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9][0-9][0-9]).*$" "\\1" + OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}" + ) + INCLUDE(CheckSymbolExists) ++ INCLUDE(CheckCSourceCompiles) + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h" + HAVE_SHA512_DIGEST_LENGTH) ++ CHECK_C_SOURCE_COMPILES(" ++ #include <openssl/dh.h> ++ int main() ++ { ++ DH dh; ++ return sizeof(dh.version); ++ }" OLD_OPENSSL_API) ++ + SET(OPENSSL_FOUND TRUE) + ELSE() + SET(OPENSSL_FOUND FALSE) + ENDIF() + - IF(OPENSSL_FOUND AND OPENSSL_MAJOR_VERSION STRLESS "101" AND + IF(OPENSSL_FOUND AND OLD_OPENSSL_API AND - CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH) + HAVE_SHA512_DIGEST_LENGTH) + MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}") + MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}") + MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}") + MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}") + + SET(SSL_SOURCES "") SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY}) + IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") + SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET}) + ENDIF() + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL}) + ENDIF() + MESSAGE(STATUS "SSL_LIBRARIES = ${SSL_LIBRARIES}") SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR}) SET(SSL_INTERNAL_INCLUDE_DIRS "") SET(SSL_DEFINES "-DHAVE_OPENSSL") diff --cc sql/CMakeLists.txt index 60e9f05542a,6648b7a2612..187f021599c --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@@ -425,8 -351,7 +425,8 @@@ IF(WIN32 ${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c COMPONENT Server ) + SET_TARGET_PROPERTIES(mysql_install_db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR}) - TARGET_LINK_LIBRARIES(mysql_install_db mysys) + TARGET_LINK_LIBRARIES(mysql_install_db mysys shlwapi) ADD_LIBRARY(winservice STATIC winservice.c) TARGET_LINK_LIBRARIES(winservice shell32)
participants (1)
-
Oleksandr Byelkin