Commit cdc3e0d9 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

New upstream version 10.1.37

parent 5d35b71d
......@@ -242,6 +242,7 @@ storage/mroonga/vendor/groonga/src/groonga-benchmark
storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset
storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result
storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
zlib/zconf.h
xxx/*
yyy/*
zzz/*
......
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
# Copyright (c) 2008, 2017, MariaDB
# Copyright (c) 2008, 2018, MariaDB Corporation
#
# 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
......
......@@ -10,9 +10,11 @@ Microsoft https://microsoft.com/ (2017)
Tencent Cloud https://cloud.tencent.com (2017)
Development Bank of Singapore https://dbs.com (2016)
IBM https://www.ibm.com (2017)
Tencent Games http://game.qq.com/ (2018)
Visma https://visma.com (2015)
Acronis http://acronis.com (2016)
Acronis https://acronis.com (2016)
Nexedi https://www.nexedi.com (2016)
Percona https://www.percona.com (2018)
Tencent Game DBA http://tencentdba.com/about (2016)
Tencent TDSQL http://tdsql.org (2016)
Verkkokauppa.com https://www.verkkokauppa.com (2015)
......
commit: 50c426200224a4527e84052aa2ab32be893f43f4
date: 2018-08-04 22:53:16 +0100
build-date: 2018-08-04 22:21:00 +0000
short: 50c4262
commit: 8d834cd0f370b306f63c2364552d187fc388e59e
date: 2018-10-31 23:48:29 +0200
build-date: 2018-10-31 21:54:07 +0000
short: 8d834cd
branch: HEAD
MariaDB source 10.1.35
MariaDB source 10.1.37
......@@ -44,10 +44,14 @@ and COPYING.thirdparty files.
IMPORTANT:
Bug and/or error reports regarding MariaDB should be submitted at
http://mariadb.org/jira
Bug and/or error reports regarding MariaDB should be submitted at:
https://jira.mariadb.org
Bugs in the MySQL code can also be submitted at http://bugs.mysql.com
For reporting security vulnerabilities see:
https://mariadb.org/about/security-policy/
Bugs in the MySQL code can also be submitted at:
http://bugs.mysql.com
The code for MariaDB, including all revision history, can be found at:
https://github.com/MariaDB/server
......
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=35
MYSQL_VERSION_PATCH=37
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2008, 2018, MariaDB Corporation
#
# 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
......
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 2017, MariaDB
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2009, 2018, MariaDB Corporation
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
......@@ -1491,7 +1491,7 @@ static struct my_option my_long_options[] =
{"batch", 'B',
"Don't use history file. Disable interactive behavior. (Enables --silent.)",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"binary-as-hex", 'b', "Print binary data as hex", &opt_binhex, &opt_binhex,
{"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir,
......
......@@ -83,12 +83,15 @@ SET(ignored
"%ignore /etc"
"%ignore /etc/init.d"
"%ignore /etc/logrotate.d"
"%ignore /etc/systemd"
"%ignore /etc/systemd/system"
"%ignore ${CMAKE_INSTALL_PREFIX}"
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
"%ignore ${CMAKE_INSTALL_PREFIX}/include"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d"
"%ignore ${CMAKE_INSTALL_PREFIX}/lib64"
"%ignore ${CMAKE_INSTALL_PREFIX}/sbin"
"%ignore ${CMAKE_INSTALL_PREFIX}/share"
......
......@@ -136,6 +136,10 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c)
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
IF(NOT _SKIP_PIC)
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS
"${CMAKE_SHARED_LIBRARY_C_FLAGS}")
ENDIF()
SET(OSLIBS)
FOREACH(LIB ${LIBS_TO_MERGE})
......@@ -240,11 +244,11 @@ MACRO(MERGE_LIBRARIES)
# check for non-PIC libraries
IF(NOT _SKIP_PIC)
FOREACH(LIB ${LIBS})
GET_TARGET_PROPERTY(${LIB} TYPE LIBTYPE)
IF(LIBTYPE STREQUAL "STATIC_LIBRARY")
GET_TARGET_PROPERTY(LIB COMPILE_FLAGS LIB_COMPILE_FLAGS)
GET_TARGET_PROPERTY(LTYPE ${LIB} TYPE)
IF(LTYPE STREQUAL "STATIC_LIBRARY")
GET_TARGET_PROPERTY(LIB_COMPILE_FLAGS ${LIB} COMPILE_FLAGS)
STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
"<PIC_FLAG>" LIB_COMPILE_FLAGS ${LIB_COMPILE_FLAG})
"<PIC_FLAG>" LIB_COMPILE_FLAGS "${LIB_COMPILE_FLAGS}")
IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>")
MESSAGE(FATAL_ERROR
"Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n"
......
......@@ -127,9 +127,8 @@ IF(MSVC)
ENDIF()
# Always link with socket library
LINK_LIBRARIES(ws2_32)
# ..also for tests
SET(CMAKE_REQUIRED_LIBRARIES ws2_32)
STRING(APPEND CMAKE_C_STANDARD_LIBRARIES " ws2_32.lib")
STRING(APPEND CMAKE_CXX_STANDARD_LIBRARIES " ws2_32.lib")
# System checks
SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs
......
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 2018, Oracle and/or its affiliates.
# Copyright (c) 2011, 2018, MariaDB Corporation
#
# 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
......
......@@ -161,13 +161,7 @@ MACRO (MYSQL_CHECK_SSL)
LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
ENDIF()
INCLUDE(CheckSymbolExists)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH)
SET(CMAKE_REQUIRED_INCLUDES)
IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND
CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
IF (OPENSSL_INCLUDE_DIR)
# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
......@@ -176,12 +170,21 @@ MACRO (MYSQL_CHECK_SSL)
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
)
STRING(REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9][0-9][0-9]).*$" "\\1"
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
ENDIF()
IF(TRUE) #OPENSSL_MAJOR_VERSION GREATER 0)
INCLUDE(CheckSymbolExists)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH)
SET(CMAKE_REQUIRED_INCLUDES)
IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND
OPENSSL_MAJOR_VERSION STRLESS "101" AND
CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
......@@ -208,12 +211,12 @@ MACRO (MYSQL_CHECK_SSL)
HAVE_EncryptAes128Gcm)
ELSE()
IF(WITH_SSL STREQUAL "system")
MESSAGE(SEND_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support")
MESSAGE(FATAL_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support")
ENDIF()
MYSQL_USE_BUNDLED_SSL()
ENDIF()
ELSE()
MESSAGE(SEND_ERROR
MESSAGE(FATAL_ERROR
"Wrong option for WITH_SSL. Valid values are: ${WITH_SSL_DOC}")
ENDIF()
ENDMACRO()
......
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
#
# 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
......@@ -14,15 +14,12 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MACRO (MYSQL_USE_BUNDLED_ZLIB)
SET(ZLIB_LIBRARY zlib)
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib)
SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
SET(BUILD_BUNDLED_ZLIB 1)
SET(ZLIB_LIBRARY zlib CACHE INTERNAL "Bundled zlib library")
SET(ZLIB_FOUND TRUE)
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
ADD_SUBDIRECTORY(zlib)
GET_TARGET_PROPERTY(src zlib SOURCES)
FOREACH(file ${src})
SET(ZLIB_SOURCES ${ZLIB_SOURCES} ${CMAKE_SOURCE_DIR}/zlib/${file})
ENDFOREACH()
ENDMACRO()
# MYSQL_CHECK_ZLIB_WITH_COMPRESS
......@@ -37,15 +34,10 @@ ENDMACRO()
MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
IF(CMAKE_SYSTEM_NAME STREQUAL "OS400" OR
CMAKE_SYSTEM_NAME STREQUAL "AIX" OR
CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Use bundled zlib on some platforms by default (system one is too
# old or not existent)
# For NDBCLUSTER: Use bundled zlib by default
IF (NOT WITH_ZLIB)
SET(WITH_ZLIB "bundled" CACHE STRING "By default use bundled zlib on this platform")
ENDIF()
ENDIF()
IF(WITH_ZLIB STREQUAL "bundled")
MYSQL_USE_BUNDLED_ZLIB()
......
......@@ -666,12 +666,6 @@
#cmakedefine WSREP_PROC_INFO 1
#endif
#ifdef _AIX
/*
AIX includes inttypes.h from sys/types.h
Explicitly request format macros before the first inclusion of inttypes.h
*/
#define __STDC_FORMAT_MACROS
#endif
#endif
......@@ -1107,11 +1107,11 @@ SET(CMAKE_EXTRA_INCLUDE_FILES)
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_INO)
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
SET(SPRINTF_RETURNS_INT 1)
CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
IF(NOT HAVE_UCONTEXT_H)
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
CHECK_INCLUDE_FILE(ucontext.h HAVE_FILE_UCONTEXT_H)
IF(NOT HAVE_FILE_UCONTEXT_H)
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_FILE_UCONTEXT_H)
ENDIF()
IF(HAVE_UCONTEXT_H)
IF(HAVE_FILE_UCONTEXT_H)
CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
ENDIF()
......
......@@ -357,7 +357,7 @@ xb_fil_cur_read(
/* skip doublewrite buffer pages */
xb_a(cursor->page_size == UNIV_PAGE_SIZE);
msg("[%02u] mariabackup: "
"Page %lu is a doublewrite buffer page, "
"Page " UINT64PF " is a doublewrite buffer page, "
"skipping.\n", cursor->thread_n, page_no);
} else {
retry_count--;
......@@ -372,7 +372,7 @@ xb_fil_cur_read(
}
msg("[%02u] mariabackup: "
"Database page corruption detected at page "
"%lu, retrying...\n", cursor->thread_n,
UINT64PF ", retrying...\n", cursor->thread_n,
page_no);
os_thread_sleep(100000);
......
......@@ -76,7 +76,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name,
/* allocate buffer for incremental backup (4096 pages) */
cp->delta_buf_size = (cursor->page_size / 4) * cursor->page_size;
cp->delta_buf = (unsigned char *)os_mem_alloc_large(&cp->delta_buf_size);
cp->delta_buf = (unsigned char *)os_mem_alloc_large(&cp->delta_buf_size, false);
if (!cp->delta_buf) {
msg("[%02u] mariabackup: Error: "
......
......@@ -443,6 +443,38 @@ datafiles_iter_free(datafiles_iter_t *it)
ut_free(it);
}
/*
Retrieve default data directory, to be used with --copy-back.
On Windows, default datadir is ..\data, relative to the
directory where mariabackup.exe is located(usually "bin")
Elsewhere, the compiled-in constant MYSQL_DATADIR is used.
*/
static char *get_default_datadir() {
static char ddir[] = MYSQL_DATADIR;
#ifdef _WIN32
static char buf[MAX_PATH];
DWORD size = (DWORD)sizeof(buf) - 1;
if (GetModuleFileName(NULL, buf, size) <= size)
{
char *p;
if ((p = strrchr(buf, '\\')))
{
*p = 0;
if ((p = strrchr(buf, '\\')))
{
strncpy(p + 1, "data", buf + MAX_PATH - p);
return buf;
}
}
}
#endif
return ddir;
}
/* ======== Date copying thread context ======== */
typedef struct {
......@@ -6764,8 +6796,7 @@ int main(int argc, char **argv)
if (xtrabackup_copy_back || xtrabackup_move_back) {
if (!check_if_param_set("datadir")) {
msg("Error: datadir must be specified.\n");
exit(EXIT_FAILURE);
mysql_data_home = get_default_datadir();
}
if (!copy_back())
exit(EXIT_FAILURE);
......
......@@ -328,7 +328,7 @@ make_atomic_store(ptr)
#define MY_ATOMIC_NOT_1CPU 1
extern int my_atomic_initialize();
#ifdef __ATOMIC_SEQ_CST
#ifdef HAVE_GCC_C11_ATOMICS
#define MY_MEMORY_ORDER_RELAXED __ATOMIC_RELAXED
#define MY_MEMORY_ORDER_CONSUME __ATOMIC_CONSUME
#define MY_MEMORY_ORDER_ACQUIRE __ATOMIC_ACQUIRE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment