Commit b662fa15 authored by Ondrej Sury's avatar Ondrej Sury

New upstream version 10.1.28

parent 46148f2e
......@@ -479,6 +479,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.")
......
commit: 535910ae5f20e36405631030e9c0eb22fe40a7c4
date: 2017-08-09 16:15:30 +0300
build-date: 2017-08-09 13:20:45 +0000
short: 535910a
commit: f0e9bebd278b27e05d9c66746420b48535f2b86e
date: 2017-09-27 10:22:15 +0200
build-date: 2017-09-27 12:07:50 +0000
short: f0e9beb
branch: HEAD
MariaDB source 10.1.26
MariaDB source 10.1.28
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=26
MYSQL_VERSION_PATCH=28
......@@ -4024,7 +4024,25 @@ static int rmtree(const char *dir)
strxnmov(path, sizeof(path), dir, sep, file->name, NULL);
if (!MY_S_ISDIR(file->mystat->st_mode))
{
err= my_delete(path, 0);
#ifdef _WIN32
/*
On Windows, check and possible reset readonly attribute.
my_delete(), or DeleteFile does not remove theses files.
*/
if (err)
{
DWORD attr= GetFileAttributes(path);
if (attr != INVALID_FILE_ATTRIBUTES &&
(attr & FILE_ATTRIBUTE_READONLY))
{
SetFileAttributes(path, attr &~ FILE_ATTRIBUTE_READONLY);
err= my_delete(path, 0);
}
}
#endif
}
else
err= rmtree(path);
......
......@@ -47,6 +47,21 @@ MACRO (RUN_BISON input_yy output_cc output_h)
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}
......@@ -54,6 +69,7 @@ MACRO (RUN_BISON input_yy output_cc output_h)
--output=${output_cc}
--defines=${output_h}
${input_yy}
${VS_FIX_OUTPUT_TIMESTAMPS}
DEPENDS ${input_yy}
)
ELSE()
......
......@@ -32,16 +32,7 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
ENDIF()
SET(targets ${ARG_DEFAULT_ARGS})
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 "")
......@@ -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)
IF(NOT target_type MATCHES "STATIC")
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp} ${opt})
ENDFOREACH()
ENDIF()
ENDFUNCTION()
......@@ -211,37 +200,22 @@ IF(WIN32)
ENDIF()
ENDIF()
MACRO(SIGN_TARGET)
MYSQL_PARSE_ARGUMENTS(ARG "COMPONENT" "" ${ARGN})
SET(target ${ARG_DEFAULT_ARGS})
IF(ARG_COMPONENT)
SET(comp COMPONENT ${ARG_COMPONENT})
ELSE()
SET(comp)
FUNCTION(SIGN_TARGET target)
IF(NOT SIGNCODE)
RETURN()
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)
ENDIF()
IF(NOT \${ERR} EQUAL 0)
MESSAGE(FATAL_ERROR \"Error signing '${target_location}'\")
ENDIF()
" ${comp})
IF((NOT target_type) OR (target_type MATCHES "STATIC"))
RETURN()
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.
#
......
......@@ -114,8 +114,8 @@ IF(MSVC)
ENDIF()
#TODO: update the code and remove the disabled warnings
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700")
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
# _WIN64 is defined by the compiler itself.
......
......@@ -222,7 +222,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()
......
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()
......@@ -181,7 +181,7 @@ MACRO (MYSQL_CHECK_SSL)
)
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
ENDIF()
IF(OPENSSL_MAJOR_VERSION GREATER 0)
IF(TRUE) #OPENSSL_MAJOR_VERSION GREATER 0)
SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
......
......@@ -26,7 +26,7 @@ ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
# Set the patch version
SET(WSREP_PATCH_VERSION "19")
SET(WSREP_PATCH_VERSION "20")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
......
......@@ -112,6 +112,11 @@ xb_mysql_connect()
(char *) &opt_secure_auth);
}
if (xb_plugin_dir && *xb_plugin_dir){
mysql_options(connection, MYSQL_PLUGIN_DIR, xb_plugin_dir);
}
mysql_options(connection, MYSQL_OPT_PROTOCOL, &opt_protocol);
msg_ts("Connecting to MySQL server host: %s, user: %s, password: %s, "
"port: %s, socket: %s\n", opt_host ? opt_host : "localhost",
opt_user ? opt_user : "not set",
......
......@@ -19,8 +19,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*******************************************************/
#ifndef WSREP_H
#define WSREP_H
#ifndef MARIABACKUP_WSREP_H
#define MARIABACKUP_WSREP_H
/***********************************************************************
Store Galera checkpoint info in the 'xtrabackup_galera_info' file, if that
......
......@@ -46,6 +46,7 @@ permission notice:
#include <trx0sys.h>
#include "common.h"
#include "backup_wsrep.h"
#ifdef WITH_WSREP
#define WSREP_XID_PREFIX "WSREPXid"
#define WSREP_XID_PREFIX_LEN MYSQL_XID_PREFIX_LEN
......
......@@ -85,7 +85,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "xbstream.h"
#include "changed_page_bitmap.h"
#include "read_filt.h"
#include "wsrep.h"
#include "backup_wsrep.h"
#include "innobackupex.h"
#include "backup_mysql.h"
#include "backup_copy.h"
......@@ -95,6 +95,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <sql_plugin.h>
#include <srv0srv.h>
#include <crc_glue.h>
#include <log.h>
/* TODO: replace with appropriate macros used in InnoDB 5.6 */
#define PAGE_ZIP_MIN_SIZE_SHIFT 10
......@@ -123,6 +124,7 @@ my_bool xtrabackup_apply_log_only = FALSE;
longlong xtrabackup_use_memory = 100*1024*1024L;
my_bool xtrabackup_create_ib_logfile = FALSE;
uint opt_protocol;
long xtrabackup_throttle = 0; /* 0:unlimited */
lint io_ticket;
os_event_t wait_throttle = NULL;
......@@ -560,6 +562,7 @@ enum options_xtrabackup
OPT_XTRA_TABLES_EXCLUDE,
OPT_XTRA_DATABASES_EXCLUDE,
OPT_PROTOCOL
};
struct my_option xb_client_options[] =
......@@ -799,6 +802,9 @@ struct my_option xb_client_options[] =
0, 0, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "This option specifies the socket to use when "
"connecting to the local database server with a UNIX domain socket. "
"The option accepts a string argument. See mysql --help for details.",
......@@ -1364,8 +1370,13 @@ xb_get_one_option(int optid,
start[1]=0 ;
}
break;
case OPT_PROTOCOL:
if (argument)
{
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
}
break;
#include "sslopt-case.h"
case '?':
......@@ -6473,6 +6484,11 @@ int main(int argc, char **argv)
system_charset_info = &my_charset_utf8_general_ci;
key_map_full.set_all();
logger.init_base();
logger.set_handlers(LOG_FILE, LOG_NONE, LOG_NONE);
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log,
MY_MUTEX_INIT_FAST);
handle_options(argc, argv, &client_defaults, &server_defaults);
int argc_server;
......
......@@ -55,6 +55,8 @@ extern char *xtrabackup_incremental_dir;
extern char *xtrabackup_incremental_basedir;
extern char *innobase_data_home_dir;
extern char *innobase_buffer_pool_filename;
extern char *xb_plugin_dir;
extern uint opt_protocol;
extern ds_ctxt_t *ds_meta;
extern ds_ctxt_t *ds_data;
......
......@@ -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()
......@@ -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()
......@@ -45,6 +45,10 @@
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
#define WSREP_SYNC_WAIT(thd_, before_) \
{ if (WSREP_CLIENT(thd_) && \
wsrep_sync_wait(thd_, before_)) goto error; }
#else
#define IF_WSREP(A,B) B
#define DBUG_ASSERT_IF_WSREP(A)
......@@ -55,6 +59,8 @@
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
#define WSREP_TO_ISOLATION_END
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
#endif
#define WSREP_SYNC_WAIT(thd_, before_)
#endif /* WITH_WSREP */
#endif /* WSERP_INCLUDED */
#endif /* WSREP_INCLUDED */
......@@ -391,6 +391,10 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
*;
};
libmariadbclient_18 {
/* empty here. aliases are added above */
};
libmysqlclient_16 {
/* empty here. aliases are added above */
};
......@@ -399,16 +403,23 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET (CLIENT_API_5_1_LIST)
SET (CLIENT_API_5_1_ALIASES)
SET (DEBIAN9_ALIASES)
FOREACH (f ${CLIENT_API_FUNCTIONS_5_1} ${CLIENT_API_5_1_EXTRA})
SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\t${f};\n")
SET(CLIENT_API_5_1_ALIASES "${CLIENT_API_5_1_ALIASES}\"${f}@libmysqlclient_16\" = ${f};\n")
SET(DEBIAN9_ALIASES "${DEBIAN9_ALIASES}\"${f}@libmariadbclient_18\" = ${f};\n")
ENDFOREACH()
SET (CLIENT_API_5_5_LIST)
FOREACH (f ${CLIENT_API_FUNCTIONS_5_5} ${CLIENT_API_5_5_EXTRA})
SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\t${f};\n")
SET(DEBIAN9_ALIASES "${DEBIAN9_ALIASES}\"${f}@libmariadbclient_18\" = ${f};\n")
ENDFOREACH()
IF(NOT DEB)
SET (DEBIAN9_ALIASES)
ENDIF()
ELSE (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING)
SET (CLIENT_API_5_1_ALIASES "/* Versioning disabled per user request. MDEV-5982 */")
ENDIF (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING)
......
......@@ -16,6 +16,8 @@
@CLIENT_API_5_1_ALIASES@
@DEBIAN9_ALIASES@
/*
On Fedora the following symbols are exported, but renamed into a mysql_
namespace. We export them as aliases, but keep original symbols too. See
......
......@@ -156,15 +156,6 @@ MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS}