Commit 84c00abf authored by Otto Kekäläinen's avatar Otto Kekäläinen

New upstream version 10.3.13

parent 499c4e40
......@@ -128,6 +128,8 @@ scripts/wsrep_sst_mysqldump
scripts/wsrep_sst_rsync
scripts/wsrep_sst_rsync_wan
scripts/wsrep_sst_mariabackup
scripts/wsrep_sst_xtrabackup
scripts/wsrep_sst_xtrabackup-v2
scripts/maria_add_gis_sp.sql
scripts/maria_add_gis_sp_bootstrap.sql
scripts/galera_new_cluster
......@@ -189,6 +191,7 @@ storage/myisam/myisampack
storage/myisam/rt_test
storage/myisam/sp_test
storage/rocksdb/ldb
storage/rocksdb/myrocks_hotbackup
storage/rocksdb/mysql_ldb
storage/rocksdb/sst_dump
storage/rocksdb/rdb_source_revision.h
......
......@@ -29,7 +29,7 @@ env:
- CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb,versioning
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
matrix:
......@@ -102,7 +102,7 @@ matrix:
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption
- os: osx
compiler: clang
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb,versioning
- os: osx
compiler: clang
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
......@@ -156,7 +156,7 @@ addons:
before_install:
- if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
brew update;
brew install gnutls lz4 lzo xz snappy ccache jemalloc curl ossp-uuid pcre;
brew install gnutls lz4 lzo xz snappy ccache jemalloc curl ossp-uuid pcre zstd;
brew link ccache;
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi
......
......@@ -122,7 +122,8 @@ get_make_parallel_flag
# SSL library to use.--with-ssl will select our bundled yaSSL
# implementation of SSL. --with-ssl=yes will first try system library
# then the boundled one --with-ssl=system will use the system library.
SSL_LIBRARY=--with-ssl=system
# We use bundled by default as this is guaranteed to work with Galera
SSL_LIBRARY=--with-ssl
if [ "x$warning_mode" = "xpedantic" ]; then
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
......@@ -194,6 +195,8 @@ base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
base_configs="$base_configs --with-big-tables $maintainer_mode"
base_configs="$base_configs --with-plugin-aria --with-aria-tmp-tables"
# Following is to get tokudb to work
base_configs="$base_configs --with-jemalloc=NO"
if test -d "$path/../cmd-line-utils/readline"
then
......
......@@ -242,8 +242,14 @@ ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG(-ggdb3 DEBUG)
OPTION(ENABLED_LOCAL_INFILE
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
SET(ENABLED_LOCAL_INFILE "AUTO" CACHE STRING "If we should should enable LOAD DATA LOCAL by default (OFF/ON/AUTO)")
IF (ENABLED_LOCAL_INFILE MATCHES "^(0|FALSE)$")
SET(ENABLED_LOCAL_INFILE OFF)
ELSEIF(ENABLED_LOCAL_INFILE MATCHES "^(1|TRUE)$")
SET(ENABLED_LOCAL_INFILE ON)
ELSEIF (NOT ENABLED_LOCAL_INFILE MATCHES "^(ON|OFF|AUTO)$")
MESSAGE(FATAL_ERROR "ENABLED_LOCAL_INFILE must be one of OFF, ON, AUTO")
ENDIF()
# Set DBUG_OFF and other optional release-only flags for non-debug project types
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
......@@ -334,7 +340,8 @@ MYSQL_CHECK_SSL()
MYSQL_CHECK_READLINE()
SET(MALLOC_LIBRARY "system")
SET(PYTHON_SHEBANG "/usr/bin/env python")
SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang")
MARK_AS_ADVANCED(PYTHON_SHEBANG)
CHECK_PCRE()
......@@ -496,5 +503,5 @@ 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.")
You have linked MariaDB with ${NON_DISTRIBUTABLE_WARNING} libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with the Free Software Foundation.")
ENDIF()
commit: faf206a848684bc0f87c93a2b47a55063bbccc6c
date: 2019-01-04 17:25:19 +0200
build-date: 2019-01-04 15:28:51 +0000
short: faf206a
commit: c8f9b3f915a729ec35c00e92cc534a01271aa6e6
date: 2019-02-20 08:44:08 +0100
build-date: 2019-02-20 07:59:16 +0000
short: c8f9b3f
branch: HEAD
MariaDB source 10.3.12
MariaDB source 10.3.13
Code status:
------------
* [![tests status](https://secure.travis-ci.org/MariaDB/server.png?branch=10.3)](https://travis-ci.org/MariaDB/server) travis-ci.org (10.3 branch)
* [![Travis CI status](https://secure.travis-ci.org/MariaDB/server.png?branch=10.3)](https://travis-ci.org/MariaDB/server) travis-ci.org (10.3 branch)
* [![Appveyor CI status](https://ci.appveyor.com/api/projects/status/4u6pexmtpuf8jq66?svg=true)](https://ci.appveyor.com/project/rasmushoj/server) ci.appveyor.com
## MariaDB: drop-in replacement for MySQL
......
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=3
MYSQL_VERSION_PATCH=12
MYSQL_VERSION_PATCH=13
SERVER_MATURITY=stable
......@@ -3,7 +3,7 @@ version: build-{build}~branch-{branch}
before_build:
- md %APPVEYOR_BUILD_FOLDER%\win_build
- cd %APPVEYOR_BUILD_FOLDER%\win_build
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0 -DWITH_MARIABACKUP=0 -DMYSQL_MAINTAINER_MODE=ERR -DPLUGIN_ROCKSDB=NO -DPLUGIN_CONNECT=NO -DBISON_EXECUTABLE=C:\cygwin64\bin\bison
build:
project: win_build\MySQL.sln
......@@ -16,6 +16,6 @@ platform: x64
test_script:
- set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
- cd %APPVEYOR_BUILD_FOLDER%\win_build\mysql-test
- perl mysql-test-run.pl --force --max-test-fail=10 --parallel=auto --testcase-timeout=10 --skip-test-list=unstable-tests --suite=main,innodb,plugins,mariabackup
- perl mysql-test-run.pl --force --max-test-fail=10 --parallel=4 --testcase-timeout=10 --skip-test-list=unstable-tests --suite=main
image: Visual Studio 2017
......@@ -46,7 +46,7 @@ ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcre pcreposix)
TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcreposix pcre)
SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE)
......
......@@ -83,6 +83,7 @@ ulong mysqld_net_retry_count = 10L;
ulong open_files_limit;
ulong opt_binlog_rows_event_max_size;
ulonglong test_flags = 0;
ulong opt_binlog_rows_event_max_encoded_size= MAX_MAX_ALLOWED_PACKET;
static uint opt_protocol= 0;
static FILE *result_file;
static char *result_file_name= 0;
......@@ -852,8 +853,14 @@ write_event_header_and_base64(Log_event *ev, FILE *result_file,
DBUG_ENTER("write_event_header_and_base64");
/* Write header and base64 output to cache */
if (ev->print_header(head, print_event_info, FALSE) ||
ev->print_base64(body, print_event_info, FALSE))
if (ev->print_header(head, print_event_info, FALSE))
DBUG_RETURN(ERROR_STOP);
DBUG_ASSERT(print_event_info->base64_output_mode == BASE64_OUTPUT_ALWAYS);
if (ev->print_base64(body, print_event_info,
print_event_info->base64_output_mode !=
BASE64_OUTPUT_DECODE_ROWS))
DBUG_RETURN(ERROR_STOP);
/* Read data from cache and write to result file */
......@@ -889,12 +896,13 @@ static bool print_base64(PRINT_EVENT_INFO *print_event_info, Log_event *ev)
type_str);
return 1;
}
return ev->print(result_file, print_event_info);
}
static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
ulong table_id, bool is_stmt_end)
ulonglong table_id, bool is_stmt_end)
{
Table_map_log_event *ignored_map=
print_event_info->m_table_map_ignored.get_table(table_id);
......@@ -1769,6 +1777,15 @@ that may lead to an endless loop.",
"This value must be a multiple of 256.",
&opt_binlog_rows_event_max_size, &opt_binlog_rows_event_max_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX, 256, ULONG_MAX, 0, 256, 0},
#ifndef DBUG_OFF
{"debug-binlog-row-event-max-encoded-size", 0,
"The maximum size of base64-encoded rows-event in one BINLOG pseudo-query "
"instance. When the computed actual size exceeds the limit "
"the BINLOG's argument string is fragmented in two.",
&opt_binlog_rows_event_max_encoded_size,
&opt_binlog_rows_event_max_encoded_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX/4, 256, ULONG_MAX, 0, 256, 0},
#endif
{"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
......
......@@ -4019,63 +4019,6 @@ void do_mkdir(struct st_command *command)
}
/*
Remove directory recursively.
*/
static int rmtree(const char *dir)
{
char path[FN_REFLEN];
char sep[]={ FN_LIBCHAR, 0 };
int err=0;
MY_DIR *dir_info= my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT));
if (!dir_info)
return 1;
for (uint i= 0; i < dir_info->number_of_files; i++)
{
FILEINFO *file= dir_info->dir_entry + i;
/* Skip "." and ".." */
if (!strcmp(file->name, ".") || !strcmp(file->name, ".."))
continue;
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);
if(err)
break;
}
my_dirend(dir_info);
if (!err)
err= rmdir(dir);
return err;
}
/*
SYNOPSIS
......@@ -4103,7 +4046,7 @@ void do_rmdir(struct st_command *command)
DBUG_VOID_RETURN;
DBUG_PRINT("info", ("removing directory: %s", ds_dirname.str));
if (rmtree(ds_dirname.str))
if (my_rmtree(ds_dirname.str, MYF(0)))
handle_command_error(command, 1, errno);
dynstr_free(&ds_dirname);
......@@ -5966,6 +5909,7 @@ void do_connect(struct st_command *command)
int read_timeout= 0;
int write_timeout= 0;
int connect_timeout= 0;
char *csname=0;
struct st_connection* con_slot;
static DYNAMIC_STRING ds_connection_name;
......@@ -6077,6 +6021,11 @@ void do_connect(struct st_command *command)
{
connect_timeout= atoi(con_options + sizeof("connect_timeout=")-1);
}
else if (strncasecmp(con_options, "CHARSET=",
sizeof("CHARSET=") - 1) == 0)
{
csname= strdup(con_options + sizeof("CHARSET=") - 1);
}
else
die("Illegal option to connect: %.*s",
(int) (end - con_options), con_options);
......@@ -6112,9 +6061,8 @@ void do_connect(struct st_command *command)
#endif
if (opt_compress || con_compress)
mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS);
mysql_options(con_slot->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME,
charset_info->csname);
csname?csname: charset_info->csname);
if (opt_charsets_dir)
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_DIR,
opt_charsets_dir);
......@@ -6212,6 +6160,11 @@ void do_connect(struct st_command *command)
if (con_slot == next_con)
next_con++; /* if we used the next_con slot, advance the pointer */
}
else // Failed to connect. Free the memory.
{
mysql_close(con_slot->mysql);
con_slot->mysql= NULL;
}
dynstr_free(&ds_connection_name);
dynstr_free(&ds_host);
......@@ -6225,6 +6178,7 @@ void do_connect(struct st_command *command)
#ifdef HAVE_SMEM
dynstr_free(&ds_shm);
#endif
free(csname);
DBUG_VOID_RETURN;
}
......@@ -9319,7 +9273,6 @@ int main(int argc, char **argv)
(void *) &opt_connect_timeout);
if (opt_compress)
mysql_options(con->mysql,MYSQL_OPT_COMPRESS,NullS);
mysql_options(con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(con->mysql, MYSQL_SET_CHARSET_NAME,
charset_info->csname);
if (opt_charsets_dir)
......
......@@ -86,7 +86,6 @@ IF(FEATURE_SET)
ENDIF()
ENDIF()
OPTION(ENABLED_LOCAL_INFILE "" ON)
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
IF(WIN32)
SET(INSTALL_MYSQLTESTDIR "" CACHE STRING "")
......
......@@ -145,6 +145,11 @@ foreach my $option (@ARGV)
$cmakeargs = $cmakeargs." -DPLUGIN_".uc($1)."=".uc($2);
next;
}
if($option =~ /without-wsrep/)
{
$cmakeargs = $cmakeargs." -DWITH_WSREP=OFF";
next;
}
if($option =~ /with-zlib-dir=bundled/)
{
$cmakeargs = $cmakeargs." -DWITH_ZLIB=bundled";
......@@ -185,6 +190,16 @@ foreach my $option (@ARGV)
$cmakeargs = $cmakeargs." -DCMAKE_BUILD_TYPE=Debug -DSECURITY_HARDENED=OFF";
next;
}
if($option =~ /with-(.*)=(.*)/)
{
$cmakeargs = $cmakeargs. " -DWITH_" . uc($1) . "=" . uc($2);
next;
}
if($option =~ /without-(.*)=(.*)/)
{
$cmakeargs = $cmakeargs. " -DWITHOUT_" . uc($1) . "=" . uc($2);
next;
}
if($option =~ /prefix=/)
{
$cmake_install_prefix= substr($option, 7);
......
......@@ -134,7 +134,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
IF(NOT_FOR_DISTRIBUTION)
SET(NON_DISTRIBUTABLE_WARNING 1)
SET(NON_DISTRIBUTABLE_WARNING "GPLv3")
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
SET(USE_NEW_READLINE_INTERFACE 0)
......
......@@ -10,7 +10,12 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE cmake_update_submodules
RESULT_VARIABLE git_config_get_result)
IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no)
IF(cmake_update_submodules MATCHES no)
SET(update_result 0)
SET(SUBMODULE_UPDATE_CONFIG_MESSAGE
"\n\nTo update submodules automatically, set cmake.update-submodules to 'yes', or 'force' to update automatically:
${GIT_EXECUTABLE} config cmake.update-submodules yes")
ELSEIF(git_config_get_result EQUAL 128)
SET(update_result 0)
ELSEIF (cmake_update_submodules MATCHES force)
MESSAGE(STATUS "Updating submodules (forced)")
......@@ -31,7 +36,6 @@ ENDIF()
IF(update_result OR NOT EXISTS ${CMAKE_SOURCE_DIR}/libmariadb/CMakeLists.txt)
MESSAGE(FATAL_ERROR "No MariaDB Connector/C! Run
git submodule update --init
Then restart the build.
")
${GIT_EXECUTABLE} submodule update --init
Then restart the build.${SUBMODULE_UPDATE_CONFIG_MESSAGE}")
ENDIF()
......@@ -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 "23")
SET(WSREP_PATCH_VERSION "24")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
......
......@@ -444,7 +444,11 @@
/*
MySQL features
*/
#cmakedefine ENABLED_LOCAL_INFILE 1
#define LOCAL_INFILE_MODE_OFF 0
#define LOCAL_INFILE_MODE_ON 1
#define LOCAL_INFILE_MODE_AUTO 2
#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_@ENABLED_LOCAL_INFILE@
#cmakedefine ENABLED_PROFILING 1
#cmakedefine EXTRA_DEBUG 1
#cmakedefine USE_SYMDIR 1
......
......@@ -260,7 +260,7 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DPACKAGE=test) # b
CHECK_INCLUDE_FILES (bfd.h BFD_H_EXISTS)
IF(BFD_H_EXISTS)
IF(NOT_FOR_DISTRIBUTION)
SET(NON_DISTRIBUTABLE_WARNING 1)
SET(NON_DISTRIBUTABLE_WARNING "GPLv3")
SET(HAVE_BFD_H 1)
ENDIF()
ENDIF()
......
......@@ -61,19 +61,19 @@ MYSQL_ADD_EXECUTABLE(mariabackup
xtrabackup.cc
innobackupex.cc
changed_page_bitmap.cc
datasink.c
ds_buffer.c
ds_compress.c
datasink.cc
ds_buffer.cc
ds_compress.cc
ds_local.cc
ds_stdout.c
ds_tmpfile.c
ds_xbstream.c