Skip to content

Commit

Permalink
Merge bb-10.2-ext into 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Sep 21, 2017
2 parents d176be8 + f70865b commit e3d44f5
Show file tree
Hide file tree
Showing 244 changed files with 3,637 additions and 2,237 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Expand Up @@ -475,6 +475,12 @@ ENDIF()

INCLUDE(CPack)

IF(WIN32 AND SIGNCODE)
# Configure post-install script for authenticode signing
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/sign.cmake.in sign.cmake @ONLY)
INSTALL(SCRIPT ${PROJECT_BINARY_DIR}/sign.cmake)
ENDIF()

IF(NON_DISTRIBUTABLE_WARNING)
MESSAGE(WARNING "
You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.")
Expand Down
1 change: 1 addition & 0 deletions client/mysql.cc
Expand Up @@ -1893,6 +1893,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
usage(1);
status.exit_status= 0;
mysql_end(-1);
break;
case 'I':
case '?':
usage(0);
Expand Down
Empty file added cmake/CMakeLis.txt
Empty file.
20 changes: 18 additions & 2 deletions cmake/bison.cmake
Expand Up @@ -47,15 +47,31 @@ MACRO (RUN_BISON input_yy output_cc output_h name_prefix)
ENDIF()
ENDIF()
IF(BISON_USABLE)
# Workaround for VS regenerating output even
# when outputs are up-to-date. At least, fix output timestamp
# after build so that files that depend on generated header are
# not rebuilt.
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
FIND_PROGRAM(TOUCH_EXECUTABLE touch DOC "Path to touch executable"
PATHS "C:/Program Files/Git/usr/bin"
"C:/Program Files (x86)/Git/usr/bin")
IF(TOUCH_EXECUTABLE)
SET(VS_FIX_OUTPUT_TIMESTAMPS
COMMAND ${TOUCH_EXECUTABLE} -r ${input_yy} ${output_cc}
COMMAND ${TOUCH_EXECUTABLE} -r ${input_yy} ${output_h})
ENDIF()
ENDIF()

ADD_CUSTOM_COMMAND(
OUTPUT ${output_cc}
${output_h}
COMMAND ${BISON_EXECUTABLE} -y -p ${name_prefix}
--output=${output_cc}
--defines=${output_h}
${input_yy}
DEPENDS ${input_yy}
)
${VS_FIX_OUTPUT_TIMESTAMPS}
DEPENDS ${input_yy}
)
ELSE()
# Bison is missing or not usable, e.g too old
IF(EXISTS ${output_cc} AND EXISTS ${output_h})
Expand Down
64 changes: 19 additions & 45 deletions cmake/install_macros.cmake
Expand Up @@ -32,17 +32,8 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
ENDIF()
SET(targets ${ARG_UNPARSED_ARGUMENTS})
FOREACH(target ${targets})
GET_TARGET_PROPERTY(type ${target} TYPE)
GET_TARGET_PROPERTY(location ${target} LOCATION)
STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE
"${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
pdb_location ${pdb_location})
ENDIF()

GET_TARGET_PROPERTY(target_type ${target} TYPE)

set(comp "")

IF(target MATCHES "mysqld" OR type MATCHES "MODULE")
Expand All @@ -61,11 +52,9 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
IF(NOT comp)
SET(comp Debuginfo_archive_only) # not in MSI
ENDIF()
IF(type MATCHES "STATIC")
# PDB for static libraries might be unsupported http://public.kitware.com/Bug/view.php?id=14600
SET(opt OPTIONAL)
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp} ${opt})
IF(NOT target_type MATCHES "STATIC")
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
ENDIF()
ENDFOREACH()
ENDIF()
ENDFUNCTION()
Expand Down Expand Up @@ -212,37 +201,22 @@ IF(WIN32)
ENDIF()
ENDIF()

MACRO(SIGN_TARGET)
CMAKE_PARSE_ARGUMENTS(ARG "" "COMPONENT" "" ${ARGN})
SET(target ${ARG_UNPARSED_ARGUMENTS})
IF(ARG_COMPONENT)
SET(comp COMPONENT ${ARG_COMPONENT})
ELSE()
SET(comp)
ENDIF()
GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF(target_type AND NOT target_type MATCHES "STATIC")
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
target_location ${target_location})
ENDIF()
INSTALL(CODE
"EXECUTE_PROCESS(COMMAND
\"${SIGNTOOL_EXECUTABLE}\" verify /pa /q \"${target_location}\"
RESULT_VARIABLE ERR)
IF(NOT \${ERR} EQUAL 0)
EXECUTE_PROCESS(COMMAND
\"${SIGNTOOL_EXECUTABLE}\" sign ${SIGNTOOL_PARAMETERS} \"${target_location}\"
RESULT_VARIABLE ERR)

FUNCTION(SIGN_TARGET target)
IF(NOT SIGNCODE)
RETURN()
ENDIF()
IF(NOT \${ERR} EQUAL 0)
MESSAGE(FATAL_ERROR \"Error signing '${target_location}'\")
GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF((NOT target_type) OR (target_type MATCHES "STATIC"))
RETURN()
ENDIF()
" ${comp})
ENDIF()
ENDMACRO()

# Mark executable for signing by creating empty *.signme file
# The actual signing happens in preinstall step
# (which traverses
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E touch "$<TARGET_FILE:${target}>.signme"
)
ENDFUNCTION()

# Installs targets, also installs pdbs on Windows.
#
Expand Down
11 changes: 7 additions & 4 deletions cmake/plugin.cmake
Expand Up @@ -219,7 +219,8 @@ MACRO(MYSQL_ADD_PLUGIN)
# Install dynamic library
IF(ARG_COMPONENT)
IF(CPACK_COMPONENTS_ALL AND
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT})
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT}
AND INSTALL_SYSCONF2DIR)
IF (ARG_STORAGE_ENGINE)
SET(ver " = %{version}-%{release}")
ELSE()
Expand All @@ -235,9 +236,11 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_PROVIDES "cmake_bug_13248" PARENT_SCOPE)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_OBSOLETES "cmake_bug_13248" PARENT_SCOPE)
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
IF(NOT ARG_CLIENT AND NOT ARG_CONFIG AND UNIX)
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
FILE(WRITE ${ARG_CONFIG} "[mariadb]\nplugin-load-add=${ARG_MODULE_OUTPUT_NAME}.so\n")
IF(NOT ARG_CLIENT AND UNIX)
IF (NOT ARG_CONFIG)
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
FILE(WRITE ${ARG_CONFIG} "[mariadb]\nplugin-load-add=${ARG_MODULE_OUTPUT_NAME}.so\n")
ENDIF()
INSTALL(FILES ${ARG_CONFIG} COMPONENT ${ARG_COMPONENT} DESTINATION ${INSTALL_SYSCONF2DIR})
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} "%config(noreplace) ${INSTALL_SYSCONF2DIR}/*" PARENT_SCOPE)
ENDIF()
Expand Down
18 changes: 18 additions & 0 deletions cmake/sign.cmake.in
@@ -0,0 +1,18 @@
FILE(GLOB_RECURSE files "@CMAKE_BINARY_DIR@/*.signme")
MESSAGE(STATUS "signing files")
FOREACH(f ${files})
STRING(REPLACE ".signme" "" exe_location "${f}")

string (REPLACE ";" " " params "@SIGNTOOL_PARAMETERS@")
#MESSAGE("@SIGNTOOL_EXECUTABLE@" sign ${params} "${exe_location}")

EXECUTE_PROCESS(COMMAND
"@SIGNTOOL_EXECUTABLE@" sign @SIGNTOOL_PARAMETERS@ "${exe_location}"
RESULT_VARIABLE ERR)
IF(NOT ${ERR} EQUAL 0)
MESSAGE( "Error ${ERR} signing ${exe_location}")
ELSE()
FILE(REMOVE ${f})
ENDIF()

ENDFOREACH()
4 changes: 2 additions & 2 deletions cmake/submodules.cmake
Expand Up @@ -7,7 +7,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no)
SET(update_result 0)
ELSEIF (cmake_update_submodules MATCHES force)
MESSAGE("-- Updating submodules (forced)")
MESSAGE(STATUS "Updating submodules (forced)")
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE update_result)
Expand All @@ -16,7 +16,7 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE update_result)
ELSE()
MESSAGE("-- Updating submodules")
MESSAGE(STATUS "Updating submodules")
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE update_result)
Expand Down
28 changes: 12 additions & 16 deletions debian/control
Expand Up @@ -48,14 +48,11 @@ Conflicts: mariadb-galera-server-10.0 (<< 10.0.5),
mariadb-server-5.1,
mariadb-server-5.2,
mariadb-server-5.3,
mariadb-server-5.5 (<< 5.5.33)
Replaces: libmariadbclient18,
libmysqlclient18,
libmysqlclient19,
mariadb-server-5.5 (<< 5.5.33),
libmariadbclient18 (<< 10.2.0)
Replaces: libmysqlclient19,
libmysqlclient20
Provides: libmariadbclient18,
libmysqlclient18,
libmysqlclient19,
Provides: libmysqlclient19,
libmysqlclient20
Description: MariaDB database client library
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
Expand All @@ -69,27 +66,29 @@ Package: libmariadbclient18
Section: libs
Architecture: any
Depends: libmariadb3 (= ${binary:Version}), ${misc:Depends}
Replaces: libmariadbclient18
Provides: libmariadbclient18
Description: Virtual package to satisfy external depends
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This is an empty package that depends on the libmariadb3
package.
This package provides compatibility symlinks for libmariadb3

Package: libmysqlclient18
Section: libs
Architecture: any
Depends: libmariadb3 (= ${binary:Version}), ${misc:Depends}
Replaces: libmysqlclient18
Provides: libmysqlclient18
Description: Virtual package to satisfy external depends
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
This is an empty package that depends on the libmariadb3
package.
This package provides compatibility symlinks for libmariadb3

Package: libmariadb-dev
Architecture: any
Expand Down Expand Up @@ -175,8 +174,7 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)

Package: mariadb-client-core-10.3
Architecture: any
Depends: libmariadb3 (>= ${source:Version}),
mariadb-common (>= ${source:Version}),
Depends: mariadb-common (>= ${source:Version}),
${misc:Depends},
${shlibs:Depends}
Conflicts: mariadb-client-10.0,
Expand Down Expand Up @@ -243,7 +241,6 @@ Description: MariaDB database core client binaries
Package: mariadb-client-10.3
Architecture: any
Depends: debianutils (>=1.6),
libmariadb3 (>= ${source:Version}),
mariadb-client-core-10.3 (>= ${source:Version}),
mariadb-common,
${misc:Depends},
Expand Down Expand Up @@ -299,8 +296,7 @@ Description: MariaDB database client binaries

Package: mariadb-server-core-10.3
Architecture: any
Depends: libmariadb3 (>= ${binary:Version}),
mariadb-common (>= ${source:Version}),
Depends: mariadb-common (>= ${source:Version}),
${misc:Depends},
${shlibs:Depends}
Conflicts: mariadb-server-core-10.0,
Expand Down
2 changes: 2 additions & 0 deletions debian/libmariadb-dev.install
@@ -1,6 +1,8 @@
usr/bin/mysql_config
usr/include/mysql
usr/lib/*/libmariadb.so
usr/lib/*/libmysqlclient.so
usr/lib/*/libmariadbclient.so
usr/lib/*/libmariadbclient.a
usr/lib/*/libmysqlservices.a
usr/share/aclocal/mysql.m4
Expand Down
2 changes: 0 additions & 2 deletions debian/libmariadb-dev.links

This file was deleted.

4 changes: 2 additions & 2 deletions debian/libmariadb3.install
@@ -1,5 +1,5 @@
usr/lib/*/libmariadbclient.so.*
usr/lib/*/libmysqlclient.so.*
usr/lib/*/libmysqlclient.so.19
usr/lib/*/libmysqlclient.so.20
usr/lib/*/libmariadb.so.*
usr/lib/mysql/plugin/dialog.so
usr/lib/mysql/plugin/mysql_clear_password.so
1 change: 1 addition & 0 deletions debian/libmariadbclient18.install
@@ -0,0 +1 @@
usr/lib/*/libmariadbclient.so.18
1 change: 1 addition & 0 deletions debian/libmysqlclient18.install
@@ -0,0 +1 @@
usr/lib/*/libmysqlclient.so.18
1 change: 1 addition & 0 deletions debian/rules
Expand Up @@ -162,6 +162,7 @@ override_dh_auto_install:
install -D -m 644 debian/mariadb-server-10.3.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.3.py

# Install libmariadbclient18 compatibility links
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so
ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so.18

# Install libmysqlclientclientXX compatibility links
Expand Down
2 changes: 1 addition & 1 deletion extra/mariabackup/backup_mysql.cc
Expand Up @@ -1647,7 +1647,7 @@ mdl_lock_init()
}
}

#ifndef DBUF_OFF
#ifndef DBUG_OFF
/* Test that table is really locked, if lock_ddl_per_table is set.
The test is executed in DBUG_EXECUTE_IF block inside mdl_lock_table().
*/
Expand Down
5 changes: 0 additions & 5 deletions extra/yassl/CMakeLists.txt
Expand Up @@ -30,8 +30,3 @@ SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp sr
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
RESTRICT_SYMBOL_EXPORTS(yassl)

IF(MSVC)
INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug)
ENDIF()


2 changes: 1 addition & 1 deletion extra/yassl/include/openssl/ssl.h
Expand Up @@ -540,7 +540,7 @@ void MD5_Final(unsigned char*, MD5_CTX*);

/* yaSSL extensions */
int SSL_set_compression(SSL*); /* turn on yaSSL zlib compression */
char *yaSSL_ASN1_TIME_to_string(ASN1_TIME *time, char *buf, size_t len);
char *yaSSL_ASN1_TIME_to_string(const ASN1_TIME *time, char *buf, size_t len);

#include "transport_types.h"

Expand Down
2 changes: 1 addition & 1 deletion extra/yassl/src/ssl.cpp
Expand Up @@ -1736,7 +1736,7 @@ unsigned long ERR_get_error()

// end stunnel needs

char *yaSSL_ASN1_TIME_to_string(ASN1_TIME *time, char *buf, size_t len)
char *yaSSL_ASN1_TIME_to_string(const ASN1_TIME *time, char *buf, size_t len)
{
tm t;
static const char *month_names[12]=
Expand Down
4 changes: 0 additions & 4 deletions extra/yassl/taocrypt/CMakeLists.txt
Expand Up @@ -32,7 +32,3 @@ SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
RESTRICT_SYMBOL_EXPORTS(taocrypt)

IF(MSVC)
INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug)
ENDIF()

19 changes: 19 additions & 0 deletions include/CMakeLists.txt
Expand Up @@ -93,3 +93,22 @@ IF(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
INSTALL_PRIVATE(${CMAKE_CURRENT_SOURCE_DIR})
ENDIF()

MACRO(INSTALL_COMPAT_HEADER file footer)
INSTALL(CODE "FILE(WRITE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}/${file}
\"/* Do not edit this file directly, it was auto-generated by cmake */
#warning This file should not be included by clients, include only <mysql.h>
${footer}
\")" COMPONENT Development)
ENDMACRO()

INSTALL_COMPAT_HEADER(my_global.h "")
INSTALL_COMPAT_HEADER(my_config.h "")
INSTALL_COMPAT_HEADER(my_sys.h "")
INSTALL_COMPAT_HEADER(mysql_version.h "
#include <mariadb_version.h>
#define LIBMYSQL_VERSION MARIADB_CLIENT_VERSION_STR
")
INSTALL_COMPAT_HEADER(mysql_com.h "
#include <mariadb_com.h>
")

0 comments on commit e3d44f5

Please sign in to comment.