Commit 3ca31350 authored by Ondrej Sury's avatar Ondrej Sury
Browse files

Rebase patches for MariaDB 10.1.29

parent 7632fe0f
From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@debian.org>
Date: Wed, 22 Nov 2017 20:32:51 +0000
Subject: Change the default optimization from -O3 to -O2 in
mysql_release.cmake BUILD_CONFIG profile
---
cmake/build_configurations/mysql_release.cmake | 12 ++++++------
.../PerconaFT/cmake_modules/TokuSetupCompiler.cmake | 16 ++++++++--------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index c07de46..69a70ff 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -155,12 +155,12 @@ IF(UNIX)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized")
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_C_FLAGS}")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized")
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_CXX_FLAGS}")
ENDIF()
# IBM Z flags
@@ -209,8 +209,8 @@ IF(UNIX)
ENDIF()
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -unroll2 -ip ${COMMON_C_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -unroll2 -ip ${COMMON_CXX_FLAGS}")
SET(WITH_SSL no)
ENDIF()
ENDIF()
@@ -219,12 +219,12 @@ IF(UNIX)
IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_C_FLAGS}")
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_CXX_FLAGS}")
ENDIF()
# Solaris flags
diff --git a/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake b/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
index 0cd9a9c..3b4b43c 100644
--- a/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
+++ b/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
@@ -115,10 +115,10 @@ set(CMAKE_CXX_FLAGS_DRD "-g3 -O1 ${CMAKE_CXX_FLAGS_DRD}")
## need to set flags for RelWithDebInfo as well because we want the MySQL/MariaDB builds to use them
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
# have tried -flto and -O4, both make our statically linked executables break apple's linker
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG")
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG")
- set(CMAKE_C_FLAGS_RELEASE "-g -O3 ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG")
- set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O2 -UNDEBUG")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O2 -UNDEBUG")
+ set(CMAKE_C_FLAGS_RELEASE "-g -O2 ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG")
+ set(CMAKE_CXX_FLAGS_RELEASE "-g -O2 ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG")
else ()
if (APPLE)
set(FLTO_OPTS "-fwhole-program")
@@ -126,10 +126,10 @@ else ()
set(FLTO_OPTS "-fuse-linker-plugin")
endif()
# we overwrite this because the default passes -DNDEBUG and we don't want that
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG")
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG")
- set(CMAKE_C_FLAGS_RELEASE "-g -O3 -flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG")
- set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O2 -UNDEBUG")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O2 -UNDEBUG")
+ set(CMAKE_C_FLAGS_RELEASE "-g -O2 -flto ${FLTO_OPTS} ${CMAKE_C_FLAGS_RELEASE} -UNDEBUG")
+ set(CMAKE_CXX_FLAGS_RELEASE "-g -O2 -flto ${FLTO_OPTS} ${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG")
set(CMAKE_EXE_LINKER_FLAGS "-g ${FLTO_OPTS} ${CMAKE_EXE_LINKER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "-g ${FLTO_OPTS} ${CMAKE_SHARED_LINKER_FLAGS}")
endif ()
--- mariadb-10.1.orig/support-files/mariadb@.service.in
+++ mariadb-10.1/support-files/mariadb@.service.in
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:30 +0200
Subject: Add_default_ExecStartPre_to_mariadb@.service
---
support-files/mariadb@.service.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
index 02be006..183b68b 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
@@ -65,6 +65,8 @@ ProtectHome=true
# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true
......
Description: Prevent unaligned memory access on armhf in mroonga storage engine
Make use of memcpy instead of straight pointer dereferencing. The surrounding
code uses the same logic and should be fixed upstream.
Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: armhf_mroonga_storage_fail
--- mariadb-10.1.orig/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
+++ mariadb-10.1/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
@@ -612,9 +612,10 @@ namespace mrn {
---
storage/mroonga/lib/mrn_multiple_column_key_codec.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
index 0038a7f..5213da8 100644
--- a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
+++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp
@@ -621,9 +621,10 @@ namespace mrn {
long long int long_long_value;
mrn_byte_order_network_to_host(&long_long_value, grn_key, grn_key_size);
int max_bit = (grn_key_size * 8 - 1);
......
Description: Fix mips missing atomics primitives
On mips we don't have native support for 64bit atomic operations. Make use
of libatomic to emulate them.
Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: c11_atomics
--- mariadb-10.1.orig/configure.cmake
+++ mariadb-10.1/configure.cmake
---
configure.cmake | 23 +++++++++++++++++++++--
include/atomic/gcc_builtins.h | 15 +++++++++++++++
include/atomic/nolock.h | 4 ++--
mysys/CMakeLists.txt | 4 ++++
sql/CMakeLists.txt | 4 ++++
5 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/configure.cmake b/configure.cmake
index 0057c7f..43ad114 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -128,7 +128,7 @@ IF(UNIX)
ENDIF()
FIND_PACKAGE(Threads)
......@@ -42,8 +51,10 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
ELSE()
MESSAGE(FATAL_ERROR "${WITH_ATOMIC_OPS} is not a valid value for WITH_ATOMIC_OPS!")
ENDIF()
--- mariadb-10.1.orig/include/atomic/gcc_builtins.h
+++ mariadb-10.1/include/atomic/gcc_builtins.h
diff --git a/include/atomic/gcc_builtins.h b/include/atomic/gcc_builtins.h
index 56a0323..044be2e 100644
--- a/include/atomic/gcc_builtins.h
+++ b/include/atomic/gcc_builtins.h
@@ -16,6 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
......@@ -73,8 +84,10 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
#ifdef MY_ATOMIC_MODE_DUMMY
#define make_atomic_load_body(S) ret= *a
#define make_atomic_store_body(S) *a= v
--- mariadb-10.1.orig/include/atomic/nolock.h
+++ mariadb-10.1/include/atomic/nolock.h
diff --git a/include/atomic/nolock.h b/include/atomic/nolock.h
index 2137445..2ad7d98 100644
--- a/include/atomic/nolock.h
+++ b/include/atomic/nolock.h
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
......@@ -93,8 +106,10 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
# include "gcc_builtins.h"
# elif defined(__i386__) || defined(__x86_64__)
# include "x86-gcc.h"
--- mariadb-10.1.orig/mysys/CMakeLists.txt
+++ mariadb-10.1/mysys/CMakeLists.txt
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index eb7f75e..a9221d7 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -78,6 +78,10 @@ IF(HAVE_BFD_H)
TARGET_LINK_LIBRARIES(mysys bfd)
ENDIF(HAVE_BFD_H)
......@@ -106,9 +121,11 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
IF (WIN32)
TARGET_LINK_LIBRARIES(mysys IPHLPAPI)
ENDIF(WIN32)
--- mariadb-10.1.orig/sql/CMakeLists.txt
+++ mariadb-10.1/sql/CMakeLists.txt
@@ -178,6 +178,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATI
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index b4acac5..8247714 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -165,6 +165,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
${SSL_LIBRARIES}
${LIBSYSTEMD})
......
Description: Extend timeout
Some Debian pbuilder/sbuilder chroots can be very slow and would timeout in
vain as given enough time the build result is fully correct.
Forwarded: not-needed
Author: Otto Kekäläinen <otto@seravo.fi>
--- mariadb-10.1.orig/mysql-test/CMakeLists.txt
+++ mariadb-10.1/mysql-test/CMakeLists.txt
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: extend_default_test_timeout_for_tokudb
---
mysql-test/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt
index 1c7cfaf..bc45177 100644
--- a/mysql-test/CMakeLists.txt
+++ b/mysql-test/CMakeLists.txt
@@ -64,7 +64,7 @@ ELSE()
ENDIF()
......
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: fix-FTBFS-on-GNU-Hurd
---
cmake/dtrace.cmake | 4 +++
cmake/package_name.cmake | 3 ++
extra/mariabackup/backup_copy.cc | 29 +++++++++++++-----
mysys/mysys_priv.h | 10 +++++--
sql/wsrep_binlog.cc | 42 ++++++++++++++++++++-------
storage/mroonga/vendor/groonga/config.h.cmake | 1 +
6 files changed, 68 insertions(+), 21 deletions(-)
diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake
index 3edcdc4..c090d65 100644
--- a/cmake/dtrace.cmake
+++ b/cmake/dtrace.cmake
@@ -45,6 +45,10 @@ MACRO(CHECK_DTRACE)
AND NOT BUGGY_LINUX_DTRACE)
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
ENDIF()
+ # On GNU/Hurd, dtrace is not supported
+ IF(DTRACE AND CMAKE_SYSTEM_NAME MATCHES "GNU")
+ SET(ENABLE_DTRACE OFF CACHE BOOL "Disable dtrace")
+ ENDIF()
SET(HAVE_DTRACE ${ENABLE_DTRACE})
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index 7681f78..2a9b1e1 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -81,6 +81,9 @@ IF(NOT VERSION)
SET(DEFAULT_MACHINE "i386")
ENDIF()
ENDIF()
+ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "GNU")
+ SET(DEFAULT_PLATFORM "GNU")
+ SET(DEFAULT_MACHINE "i386")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}")
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index c019209..632faad 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -623,11 +623,13 @@ static
int
mkdirp(const char *pathname, int Flags, myf MyFlags)
{
- char parent[PATH_MAX], *p;
+ char *parent, *p;
+ int len = strlen(pathname) + 1;
/* make a parent directory path */
- strncpy(parent, pathname, sizeof(parent));
- parent[sizeof(parent) - 1] = 0;
+ parent = (char *)malloc(len);
+ strncpy(parent, pathname, len);
+ parent[len] = 0;
for (p = parent + strlen(parent);
!is_path_separator(*p) && p != parent; p--);
@@ -636,19 +638,23 @@ mkdirp(const char *pathname, int Flags, myf MyFlags)
/* try to make parent directory */
if (p != parent && mkdirp(parent, Flags, MyFlags) != 0) {
+ free(parent);
return(-1);
}
/* make this one if parent has been made */
if (my_mkdir(pathname, Flags, MyFlags) == 0) {
+ free(parent);
return(0);
}
/* if it already exists that is fine */
if (errno == EEXIST) {
+ free(parent);
return(0);
}
+ free(parent);
return(-1);
}
@@ -658,17 +664,24 @@ bool
equal_paths(const char *first, const char *second)
{
#ifdef HAVE_REALPATH
- char real_first[PATH_MAX];
- char real_second[PATH_MAX];
+ char *real_first, *real_second;
+ int result;
- if (realpath(first, real_first) == NULL) {
+ real_first = realpath(first, 0);
+ if (real_first == NULL) {
return false;
}
- if (realpath(second, real_second) == NULL) {
+
+ real_second = realpath(second, 0);
+ if (real_second == NULL) {
+ free(real_second);
return false;
}
- return (strcmp(real_first, real_second) == 0);
+ result = strcmp(real_first, real_second);
+ free(real_first);
+ free(real_second);
+ return result == 0;
#else
return strcmp(first, second) == 0;
#endif
diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h
index 892e091..9bf44e0 100644
--- a/mysys/mysys_priv.h
+++ b/mysys/mysys_priv.h
@@ -16,6 +16,10 @@
#ifndef MYSYS_PRIV_INCLUDED
#define MYSYS_PRIV_INCLUDED
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <my_global.h>
#include <my_sys.h>
#include <my_crypt.h>
@@ -111,7 +115,7 @@ void my_error_unregister_all(void);
#ifndef O_PATH /* not Linux */
#if defined(O_SEARCH) /* Illumos */
#define O_PATH O_SEARCH
-#elif defined(O_EXEC) /* FreeBSD */
+#elif defined(O_EXEC) && defined(__FreeBSD_kernel__) /* FreeBSD */
#define O_PATH O_EXEC
#endif
#endif
@@ -128,8 +132,8 @@ const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd);
return res;
#elif defined(HAVE_REALPATH) && defined(PATH_MAX)
#define NOSYMLINK_FUNCTION_BODY(AT,NOAT) \
- char buf[PATH_MAX+1]; \
- if (realpath(pathname, buf) == NULL) return -1; \
+ char *buf = realpath(NULL, 0); \
+ if (buf == NULL) return -1; \
if (strcmp(pathname, buf)) { errno= ENOTDIR; return -1; } \
return NOAT;
#elif defined(HAVE_REALPATH)
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc
index 998f4e7..784b235 100644
--- a/sql/wsrep_binlog.cc
+++ b/sql/wsrep_binlog.cc
@@ -318,13 +318,23 @@ int wsrep_write_cache(wsrep_t* const wsrep,
void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
{
- char filename[PATH_MAX]= {0};
- int len= snprintf(filename, PATH_MAX, "%s/GRA_%ld_%lld.log",
+ int len = snprintf(NULL, 0, "%s/GRA_%ld_%lld.log",
wsrep_data_home_dir, thd->thread_id,
(long long)wsrep_thd_trx_seqno(thd));
- if (len >= PATH_MAX)
+ if (len < 0)
{
- WSREP_ERROR("RBR dump path too long: %d, skipping dump.", len);
+ WSREP_ERROR("snprintf error: %d, skipping dump.", len);
+ DBUG_VOID_RETURN;
+ }
+
+ char *filename= (char *)malloc(len++);
+ int len1= snprintf(filename, len, "%s/GRA_%ld_%lld.log",
+ wsrep_data_home_dir, thd->thread_id,
+ (long long)wsrep_thd_trx_seqno(thd));
+ if (len >= len1)
+ {
+ WSREP_ERROR("RBR dump path truncated: %d, skipping dump.", len);
+ free(filename);
return;
}
@@ -343,6 +353,7 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
WSREP_ERROR("Failed to open file '%s': %d (%s)",
filename, errno, strerror(errno));
}
+ free(filename);
}
/*
@@ -448,19 +459,29 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
{
DBUG_ENTER("wsrep_dump_rbr_buf_with_header");
- char filename[PATH_MAX]= {0};
File file;
IO_CACHE cache;
Log_event_writer writer(&cache);
Format_description_log_event *ev=NULL;
- int len= my_snprintf(filename, PATH_MAX, "%s/GRA_%ld_%lld_v2.log",
- wsrep_data_home_dir, thd->thread_id,
- (long long) wsrep_thd_trx_seqno(thd));
+ int len = snprintf(NULL, 0, "%s/GRA_%ld_%lld_v2.log",
+ wsrep_data_home_dir, thd->thread_id,
+ (long long) wsrep_thd_trx_seqno(thd));
- if (len >= PATH_MAX)
+ if (len < 0)
{
- WSREP_ERROR("RBR dump path too long: %d, skipping dump.", len);
+ WSREP_ERROR("snprintf error: %d, skipping dump.", len);
+ DBUG_VOID_RETURN;
+ }
+
+ char *filename = (char *)malloc(len++);
+ int len1 = my_snprintf(filename, len, "%s/GRA_%ld_%lld_v2.log",
+ wsrep_data_home_dir, thd->thread_id,
+ (long long) wsrep_thd_trx_seqno(thd));
+
+ if (len >= len1)
+ {
+ WSREP_ERROR("RBR dump path truncated: %d, skipping dump.", len);
DBUG_VOID_RETURN;
}
@@ -498,6 +519,7 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
}
cleanup2:
+ free(filename);
end_io_cache(&cache);
cleanup1:
diff --git a/storage/mroonga/vendor/groonga/config.h.cmake b/storage/mroonga/vendor/groonga/config.h.cmake
index bfd0cbd..ec67c5e 100644
--- a/storage/mroonga/vendor/groonga/config.h.cmake
+++ b/storage/mroonga/vendor/groonga/config.h.cmake
@@ -107,6 +107,7 @@
#cmakedefine HAVE_SIGNAL_H
#cmakedefine HAVE_SYS_MMAN_H
#cmakedefine HAVE_SYS_PARAM_H
+#cmakedefine HAVE_SYS_POLL_H
#cmakedefine HAVE_SYS_RESOURCE_H
#cmakedefine HAVE_SYS_SELECT_H
#cmakedefine HAVE_SYS_SOCKET_H
Description: Do not check socket path truncation on hurd either
On GNU/Hurd perl's $sock->hostpath() can't work since the path is not recorded
in the socket internals. GNU/Hurd doesn't have any socket path limitation
anyway, so the attached proposed patch just skips the check.
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: hurd_socket
--- mariadb-10.1.orig/mysql-test/lib/My/Platform.pm
+++ mariadb-10.1/mysql-test/lib/My/Platform.pm
---
mysql-test/lib/My/Platform.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm
index 110cf8a..c49450b 100644
--- a/mysql-test/lib/My/Platform.pm
+++ b/mysql-test/lib/My/Platform.pm
@@ -112,6 +112,8 @@ sub check_socket_path_length {
return 0 if ($^O eq 'aix');
# See Debian bug #670722 - failing on kFreeBSD even after setting short path
......
Description: Add options to innodb test that fixes possible test failure
It was noticed that the test innodb_simulate_comp_failures_small
repeatedly fails on some machines because the test is way too I/O
heavy and mysqld starts to time-out under heavy load.
.
Remove this once upstream has released an official fix.
Author: Otto Kekäläinen <otto@seravo.fi>
Bug: https://jira.mariadb.org/browse/MDEV-6682
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: innodb_simulate_comp_test_speedup
--- mariadb-10.1.orig/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt
+++ mariadb-10.1/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt
---
mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt | 1 +
1 file changed, 1 insertion(+)
diff --git a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt
index fae3205..2ac6dc5 100644
--- a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small-master.opt
@@ -1,2 +1,3 @@
--innodb-file-per-table
+--innodb-flush-log-at-trx-commit=2
......
--- mariadb-10.1.orig/storage/tokudb/PerconaFT/portability/portability.cc
+++ mariadb-10.1/storage/tokudb/PerconaFT/portability/portability.cc
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: kFreeBSD-gettid
---
storage/tokudb/PerconaFT/portability/portability.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/storage/tokudb/PerconaFT/portability/portability.cc b/storage/tokudb/PerconaFT/portability/portability.cc
index 19f445a..73dce92 100644
--- a/storage/tokudb/PerconaFT/portability/portability.cc
+++ b/storage/tokudb/PerconaFT/portability/portability.cc
@@ -115,6 +115,10 @@ toku_os_gettid(void) {
return syscall(SYS_gettid);
#elif defined(HAVE_PTHREAD_GETTHREADID_NP)
......
Author: Otto Kekäläinen <otto@debian.org>
Date: Fri Jul 8 23:52:23 2016 +0300
Rename libmysqlclient to libmariadbclient in order to ship a
libmariadbclient.so.18 in libmariadbclient18 and
libmariadbclient.so in libmariadbclient-dev. There is a separate
libmariadbclient-dev-compat package that links libmysqlclient.so
to libmariadbclient.so.
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:27 +0200
Subject: libmariadbclient-rename
--- mariadb-10.1.orig/client/CMakeLists.txt
+++ mariadb-10.1/client/CMakeLists.txt
---
client/CMakeLists.txt | 24 ++++++++++++------------
cmake/for_clients.cmake | 8 ++++----
libmysql/CMakeLists.txt | 27 ++++++++++++++++-----------
man/mysql_config.1 | 6 +++---
scripts/make_win_bin_dist | 8 ++++----
scripts/mysql_config.pl.in | 6 +++---
tests/CMakeLists.txt | 6 +++---
unittest/mysys/CMakeLists.txt | 2 +-
8 files changed, 46 insertions(+), 41 deletions(-)
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index e4643ad..523912e 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -32,7 +32,7 @@ COPY_OPENSSL_DLLS(copy_openssl_client)
ADD_DEFINITIONS(${SSL_DEFINES})
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc
......@@ -76,49 +85,58 @@ Date: Fri Jul 8 23:52:23 2016 +0300
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example
PROPERTIES HAS_CXX TRUE)
--- mariadb-10.1.orig/libmysql/CMakeLists.txt
+++ mariadb-10.1/libmysql/CMakeLists.txt
@@ -278,7 +278,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
INCLUDE (CheckCSourceCompiles)
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.ld"
- "VERSION {\nlibmysqlclient_18 {\nglobal: *;\n};\n}\n")
+ "VERSION {\nlibmariadbclient_18 {\nglobal: *;\n};\n}\n")
SET(CMAKE_REQUIRED_LIBRARIES "-Wl,src.ld")
CHECK_C_SOURCE_COMPILES("int main() { return 0; }"
SUPPORTS_VERSION_IN_LINK_SCRIPT)
@@ -380,18 +380,18 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# Generate version script.
# Create semicolon separated lists of functions to export from
# Since RPM packages use separate versioning for 5.1 API
- # and 5.5 API (libmysqlclient_16 vs libmysqlclient_18),
+ # and 5.5 API (libmariadbclient_16 vs libmariadbclient_18),
# we need 2 lists.
SET (VERSION_HEADER
"VERSION {
- libmysqlclient_18 {
+ libmariadbclient_18 {
global:")
SET (VERSION_FOOTER
" local:
*;
};
diff --git a/cmake/for_clients.cmake b/cmake/for_clients.cmake
index dd79ea1..879da78 100644
--- a/cmake/for_clients.cmake
+++ b/cmake/for_clients.cmake
@@ -2,8 +2,8 @@
# Generate LIBS and CFLAGS that third-party clients should use
#
- libmysqlclient_16 {
+ libmariadbclient_16 {
-# Use cmake variables to inspect dependencies for
-# mysqlclient library (add -l stuff)
+# Use cmake variables to inspect dependencies for
+# mariadbclient library (add -l stuff)
SET(CLIENT_LIBS "")
SET(LIBS "")
@@ -45,10 +45,10 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
ENDIF()
ENDMACRO()
-EXTRACT_LINK_LIBRARIES(mysqlclient LIBS)
+EXTRACT_LINK_LIBRARIES(mariadbclient LIBS)
EXTRACT_LINK_LIBRARIES(mysqlserver EMB_LIBS)
-SET(LIBS "-lmysqlclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}")
+SET(LIBS "-lmariadbclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}")
SET(EMB_LIBS "-lmysqld ${ZLIB_DEPS} ${EMB_LIBS} ${openssl_libs}")
MACRO(REPLACE_FOR_CLIENTS VAR)
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index acbd80b..5819d79 100644
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -398,6 +398,10 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
libmysqlclient_16 {
/* empty here. aliases are added above */
};
+
+ libmariadbclient_16 {
+ /* empty here. aliases are added above */
+ };
}
@@ -401,7 +401,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET (CLIENT_API_5_1_ALIASES)
")
@@ -407,6 +411,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
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(CLIENT_API_5_1_ALIASES "${CLIENT_API_5_1_ALIASES}\"${f}@libmariadbclient_16\" = ${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_16\" = ${f};\n")
SET(DEBIAN9_ALIASES "${DEBIAN9_ALIASES}\"${f}@libmariadbclient_18\" = ${f};\n")
ENDFOREACH()
SET (CLIENT_API_5_5_LIST)
@@ -446,13 +446,13 @@ ADD_DEPENDENCIES(clientlib GenError)
@@ -457,13 +462,13 @@ ADD_DEPENDENCIES(clientlib GenError)
SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL})
......@@ -135,7 +153,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
ENDIF()
@@ -468,7 +468,7 @@ IF(UNIX)
@@ -479,7 +484,7 @@ IF(UNIX)
SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
ENDIF()
ENDMACRO()
......@@ -144,7 +162,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
ENDIF()
IF(NOT DISABLE_SHARED)
@@ -484,9 +484,9 @@ IF(NOT DISABLE_SHARED)
@@ -495,9 +500,9 @@ IF(NOT DISABLE_SHARED)
ELSE()
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
ENDIF()
......@@ -156,7 +174,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
VERSION "${OS_SHARED_LIB_VERSION}"
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS)
@@ -499,13 +499,13 @@ IF(NOT DISABLE_SHARED)
@@ -510,13 +515,13 @@ IF(NOT DISABLE_SHARED)
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}")
ENDIF()
# clean direct output needs to be set several targets have the same name
......@@ -174,7 +192,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
""
linkname)
@@ -514,7 +514,7 @@ IF(NOT DISABLE_SHARED)
@@ -525,7 +530,7 @@ IF(NOT DISABLE_SHARED)
LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
GET_VERSIONED_LIBNAME(
......@@ -183,8 +201,10 @@ Date: Fri Jul 8 23:52:23 2016 +0300
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
"${ver}"
linkname)
--- mariadb-10.1.orig/man/mysql_config.1
+++ mariadb-10.1/man/mysql_config.1
diff --git a/man/mysql_config.1 b/man/mysql_config.1
index 47e8a3a..c699974 100644
--- a/man/mysql_config.1
+++ b/man/mysql_config.1
@@ -38,7 +38,7 @@ supports the following options\&.
\fB\-\-cflags\fR
.sp
......@@ -194,7 +214,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
library\&. The options returned are tied to the specific compiler that was used when the library was created and might clash with the settings for your own compiler\&. Use
\fB\-\-include\fR
for more portable options that contain only include paths\&.
@@ -196,9 +196,9 @@ Usage: /usr/local/mysql/bin/mysql_config
@@ -196,9 +196,9 @@ Usage: /usr/local/mysql/bin/mysql_config [options]
Options:
\-\-cflags [\-I/usr/local/mysql/include/mysql \-mcpu=pentiumpro]
\-\-include [\-I/usr/local/mysql/include/mysql]
......@@ -206,34 +226,10 @@ Date: Fri Jul 8 23:52:23 2016 +0300
\-lpthread \-lz \-lcrypt \-lnsl \-lm \-lpthread]
\-\-socket [/tmp/mysql\&.sock]
\-\-port [3306]
--- mariadb-10.1.orig/cmake/for_clients.cmake
+++ mariadb-10.1/cmake/for_clients.cmake
@@ -2,8 +2,8 @@
# Generate LIBS and CFLAGS that third-party clients should use
#
-# Use cmake variables to inspect dependencies for
-# mysqlclient library (add -l stuff)
+# Use cmake variables to inspect dependencies for
+# mariadbclient library (add -l stuff)
SET(CLIENT_LIBS "")
SET(LIBS "")
@@ -45,10 +45,10 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
ENDIF()
ENDMACRO()
-EXTRACT_LINK_LIBRARIES(mysqlclient LIBS)
+EXTRACT_LINK_LIBRARIES(mariadbclient LIBS)
EXTRACT_LINK_LIBRARIES(mysqlserver EMB_LIBS)
-SET(LIBS "-lmysqlclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}")
+SET(LIBS "-lmariadbclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}")
SET(EMB_LIBS "-lmysqld ${ZLIB_DEPS} ${EMB_LIBS} ${openssl_libs}")
MACRO(REPLACE_FOR_CLIENTS VAR)
--- mariadb-10.1.orig/scripts/make_win_bin_dist
+++ mariadb-10.1/scripts/make_win_bin_dist
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index 2415d40..bfff308 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -293,7 +293,7 @@ mkdir -p $DESTDIR/lib/plugin
cp sql/$TARGET/mysqld.lib $DESTDIR/lib/
cp libmysql/$TARGET/libmysql.dll \
......@@ -243,7 +239,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
mysys/$TARGET/mysys.lib \
regex/$TARGET/regex.lib \
strings/$TARGET/strings.lib \
@@ -302,7 +302,7 @@ cp storage/*/$TARGET/ha_*.dll $DESTDIR/l
@@ -302,7 +302,7 @@ cp storage/*/$TARGET/ha_*.dll $DESTDIR/lib/plugin/
if [ x"$TARGET" != x"release" ] ; then
cp libmysql/$TARGET/libmysql.pdb \
......@@ -252,7 +248,7 @@ Date: Fri Jul 8 23:52:23 2016 +0300
mysys/$TARGET/mysys.pdb \
regex/$TARGET/regex.pdb \
strings/$TARGET/strings.pdb \
@@ -318,8 +318,8 @@ if [ x"$PACK_DEBUG" = x"" -a -f "libmysq
@@ -318,8 +318,8 @@ if [ x"$PACK_DEBUG" = x"" -a -f "libmysql/debug/libmysql.lib" -o \
cp libmysql/debug/libmysql.dll \
libmysql/debug/libmysql.lib \
libmysql/debug/libmysql.pdb \
......@@ -263,8 +259,10 @@ Date: Fri Jul 8 23:52:23 2016 +0300
mysys/debug/mysys.lib \
mysys/debug/mysys.pdb \
regex/debug/regex.lib \
--- mariadb-10.1.orig/scripts/mysql_config.pl.in
+++ mariadb-10.1/scripts/mysql_config.pl.in
diff --git a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in
index f2c27bc..9cf718b 100644
--- a/scripts/mysql_config.pl.in
+++ b/scripts/mysql_config.pl.in
@@ -183,15 +183,15 @@ if ( $^O eq "MSWin32" )
my $linkpath = "$pkglibdir";
# user32 is only needed for debug or embedded
......@@ -284,8 +282,10 @@ Date: Fri Jul 8 23:52:23 2016 +0300
@lib_e_opts = ($linkpath,"-lmysqld");
}
--- mariadb-10.1.orig/tests/CMakeLists.txt
+++ mariadb-10.1/tests/CMakeLists.txt
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f32e027..cb7e31c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -18,12 +18,12 @@ ADD_DEFINITIONS("-DMYSQL_CLIENT")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
......@@ -310,9 +310,11 @@ Date: Fri Jul 8 23:52:23 2016 +0300
SET_TARGET_PROPERTIES(async_queries PROPERTIES LINKER_LANGUAGE CXX)
ENDIF()
--- mariadb-10.1.orig/unittest/mysys/CMakeLists.txt
+++ mariadb-10.1/unittest/mysys/CMakeLists.txt
@@ -21,7 +21,7 @@ MY_ADD_TESTS(my_vsnprintf LINK_LIBRARIES
diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt
index ad5195a..965df3c 100644
--- a/unittest/mysys/CMakeLists.txt
+++ b/unittest/mysys/CMakeLists.txt
@@ -21,7 +21,7 @@ MY_ADD_TESTS(my_vsnprintf LINK_LIBRARIES strings mysys)
ADD_DEFINITIONS(${SSL_DEFINES})
MY_ADD_TESTS(ma_dyncol
......
Description: Handle unaligned buffers in connect's TYPBLK class
On MIPS platforms (and probably others) unaligned memory access results in a
bus error. In the connect storage engine, block data for some data formats is
stored packed in memory and the TYPBLK class is used to read values from it.
Since TYPBLK does not have special handling for this packed memory, it can
quite easily result in unaligned memory accesses.
.
The simple way to fix this is to perform all accesses to the main buffer
through memcpy. With GCC and optimizations turned on, this call to memcpy is
completely optimized away on architectures where unaligned accesses are ok
(like x86).
Author: James Cowgill <jcowgill@debian.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: mips-connect-unaligned
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- mariadb-10.1.orig/storage/connect/valblk.h
+++ mariadb-10.1/storage/connect/valblk.h
@@ -139,6 +139,7 @@ class VALBLK : public BLOCK {
int Prec; // Precision of float values
}; // end of class VALBLK
+
/***********************************************************************/
/* Class TYPBLK: represents a block of typed values. */
/***********************************************************************/
@@ -151,40 +152,41 @@ class TYPBLK : public VALBLK {
// Implementation
virtual bool Init(PGLOBAL g, bool check);
virtual int GetVlen(void) {return sizeof(TYPE);}
- virtual char GetTinyValue(int n) {return (char)Typp[n];}
- virtual uchar GetUTinyValue(int n) {return (uchar)Typp[n];}
- virtual short GetShortValue(int n) {return (short)Typp[n];}
- virtual ushort GetUShortValue(int n) {return (ushort)Typp[n];}
- virtual int GetIntValue(int n) {return (int)Typp[n];}
- virtual uint GetUIntValue(int n) {return (uint)Typp[n];}
- virtual longlong GetBigintValue(int n) {return (longlong)Typp[n];}
- virtual ulonglong GetUBigintValue(int n) {return (ulonglong)Typp[n];}
- virtual double GetFloatValue(int n) {return (double)Typp[n];}
+
+ virtual char GetTinyValue(int n) {return (char)UnalignedRead(n);}
+ virtual uchar GetUTinyValue(int n) {return (uchar)UnalignedRead(n);}
+ virtual short GetShortValue(int n) {return (short)UnalignedRead(n);}
+ virtual ushort GetUShortValue(int n) {return (ushort)UnalignedRead(n);}
+ virtual int GetIntValue(int n) {return (int)UnalignedRead(n);}
+ virtual uint GetUIntValue(int n) {return (uint)UnalignedRead(n);}
+ virtual longlong GetBigintValue(int n) {return (longlong)UnalignedRead(n);}
+ virtual ulonglong GetUBigintValue(int n) {return (ulonglong)UnalignedRead(n);}
+ virtual double GetFloatValue(int n) {return (double)UnalignedRead(n);}
virtual char *GetCharString(char *p, int n);
- virtual void Reset(int n) {Typp[n] = 0;}
+ virtual void Reset(int n) {UnalignedWrite(n, 0);}
// Methods
using VALBLK::SetValue;
virtual void SetValue(PCSZ sp, int n);
virtual void SetValue(const char *sp, uint len, int n);
virtual void SetValue(short sval, int n)
- {Typp[n] = (TYPE)sval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
virtual void SetValue(ushort sval, int n)
- {Typp[n] = (TYPE)sval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
virtual void SetValue(int lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(uint lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(longlong lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(ulonglong lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(double fval, int n)
- {Typp[n] = (TYPE)fval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)fval); SetNull(n, false);}
virtual void SetValue(char cval, int n)
- {Typp[n] = (TYPE)cval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
virtual void SetValue(uchar cval, int n)
- {Typp[n] = (TYPE)cval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
virtual void SetValue(PVAL valp, int n);
virtual void SetValue(PVBLK pv, int n1, int n2);
virtual void SetMin(PVAL valp, int n);
@@ -206,6 +208,17 @@ class TYPBLK : public VALBLK {
// Members
TYPE* const &Typp;
const char *Fmt;
+
+ // Unaligned access
+ TYPE UnalignedRead(int n) const {
+ TYPE result;
+ memcpy(&result, Typp + n, sizeof(TYPE));
+ return result;
+ }
+
+ void UnalignedWrite(int n, TYPE value) {
+ memcpy(Typp + n, &value, sizeof(TYPE));
+ }
}; // end of class TYPBLK
/***********************************************************************/
--- mariadb-10.1.orig/storage/connect/valblk.cpp
+++ mariadb-10.1/storage/connect/valblk.cpp
@@ -265,14 +265,14 @@ bool TYPBLK<TYPE>::Init(PGLOBAL g, bool
storage/connect/valblk.cpp | 41 ++++++++++++++++++-------------------
storage/connect/valblk.h | 51 +++++++++++++++++++++++++++++-----------------
2 files changed, 52 insertions(+), 40 deletions(-)
diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp
index 018c7ee..d32f804 100644
--- a/storage/connect/valblk.cpp
+++ b/storage/connect/valblk.cpp
@@ -266,14 +266,14 @@ bool TYPBLK<TYPE>::Init(PGLOBAL g, bool check)
template <class TYPE>
char *TYPBLK<TYPE>::GetCharString(char *p, int n)
{
......@@ -120,7 +28,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
return p;
} // end of GetCharString
@@ -288,7 +288,7 @@ void TYPBLK<TYPE>::SetValue(PVAL valp, i
@@ -289,7 +289,7 @@ void TYPBLK<TYPE>::SetValue(PVAL valp, int n)
ChkTyp(valp);
if (!(b = valp->IsNull()))
......@@ -129,7 +37,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
else
Reset(n);
@@ -350,9 +350,9 @@ void TYPBLK<TYPE>::SetValue(PCSZ p, int
@@ -351,9 +351,9 @@ void TYPBLK<TYPE>::SetValue(PCSZ p, int n)
ulonglong val = CharToNumber(p, strlen(p), maxval, Unsigned, &minus);
if (minus && val < maxval)
......@@ -141,7 +49,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
SetNull(n, false);
} // end of SetValue
@@ -395,7 +395,7 @@ void TYPBLK<double>::SetValue(PCSZ p, in
@@ -396,7 +396,7 @@ void TYPBLK<double>::SetValue(PCSZ p, int n)
throw Type;
} // endif Check
......@@ -150,7 +58,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
SetNull(n, false);
} // end of SetValue
@@ -427,7 +427,7 @@ void TYPBLK<TYPE>::SetValue(PVBLK pv, in
@@ -428,7 +428,7 @@ void TYPBLK<TYPE>::SetValue(PVBLK pv, int n1, int n2)
ChkTyp(pv);
if (!(b = pv->IsNull(n2) && Nullable))
......@@ -159,7 +67,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
else
Reset(n1);
@@ -478,10 +478,10 @@ void TYPBLK<TYPE>::SetMin(PVAL valp, int
@@ -479,10 +479,10 @@ void TYPBLK<TYPE>::SetMin(PVAL valp, int n)
{
CheckParms(valp, n)
TYPE tval = GetTypedValue(valp);
......@@ -172,7 +80,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
} // end of SetMin
@@ -493,10 +493,10 @@ void TYPBLK<TYPE>::SetMax(PVAL valp, int
@@ -494,10 +494,10 @@ void TYPBLK<TYPE>::SetMax(PVAL valp, int n)
{
CheckParms(valp, n)
TYPE tval = GetTypedValue(valp);
......@@ -185,7 +93,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
} // end of SetMax
@@ -510,8 +510,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, i
@@ -511,8 +511,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, int k, int n)
CheckType(pv)
TYPE *lp = ((TYPBLK*)pv)->Typp;
......@@ -195,7 +103,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
} // end of SetValues
#endif // 0
@@ -522,7 +521,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, i
@@ -523,7 +522,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, int k, int n)
template <class TYPE>
void TYPBLK<TYPE>::Move(int i, int j)
{
......@@ -204,7 +112,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
MoveNull(i, j);
} // end of Move
@@ -536,7 +535,7 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n
@@ -537,7 +536,7 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n)
ChkIndx(n);
ChkTyp(vp);
#endif // _DEBUG
......@@ -213,7 +121,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
TYPE vlv = GetTypedValue(vp);
return (vlv > mlv) ? 1 : (vlv < mlv) ? (-1) : 0;
@@ -548,8 +547,8 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n
@@ -549,8 +548,8 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n)
template <class TYPE>
int TYPBLK<TYPE>::CompVal(int i1, int i2)
{
......@@ -224,7 +132,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
return (lv1 > lv2) ? 1 : (lv1 < lv2) ? (-1) : 0;
} // end of CompVal
@@ -586,7 +585,7 @@ int TYPBLK<TYPE>::Find(PVAL vp)
@@ -587,7 +586,7 @@ int TYPBLK<TYPE>::Find(PVAL vp)
TYPE n = GetTypedValue(vp);
for (i = 0; i < Nval; i++)
......@@ -233,7 +141,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
break;
return (i < Nval) ? i : (-1);
@@ -602,7 +601,7 @@ int TYPBLK<TYPE>::GetMaxLength(void)
@@ -603,7 +602,7 @@ int TYPBLK<TYPE>::GetMaxLength(void)
int i, n, m;
for (i = n = 0; i < Nval; i++) {
......@@ -242,7 +150,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
n = MY_MAX(n, m);
} // endfor i
@@ -1332,7 +1331,7 @@ char *DATBLK::GetCharString(char *p, int
@@ -1333,7 +1332,7 @@ char *DATBLK::GetCharString(char *p, int n)
char *vp;
if (Dvalp) {
......@@ -251,7 +159,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
vp = Dvalp->GetCharString(p);
} else
vp = TYPBLK<int>::GetCharString(p, n);
@@ -1348,7 +1347,7 @@ void DATBLK::SetValue(PCSZ p, int n)
@@ -1349,7 +1348,7 @@ void DATBLK::SetValue(PCSZ p, int n)
if (Dvalp) {
// Decode the string according to format
Dvalp->SetValue_psz(p);
......@@ -260,3 +168,94 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
} else
TYPBLK<int>::SetValue(p, n);
diff --git a/storage/connect/valblk.h b/storage/connect/valblk.h
index ad97010..3912868 100644
--- a/storage/connect/valblk.h
+++ b/storage/connect/valblk.h
@@ -139,6 +139,7 @@ class VALBLK : public BLOCK {
int Prec; // Precision of float values
}; // end of class VALBLK
+
/***********************************************************************/
/* Class TYPBLK: represents a block of typed values. */
/***********************************************************************/
@@ -151,40 +152,41 @@ class TYPBLK : public VALBLK {
// Implementation
virtual bool Init(PGLOBAL g, bool check);
virtual int GetVlen(void) {return sizeof(TYPE);}
- virtual char GetTinyValue(int n) {return (char)Typp[n];}
- virtual uchar GetUTinyValue(int n) {return (uchar)Typp[n];}
- virtual short GetShortValue(int n) {return (short)Typp[n];}
- virtual ushort GetUShortValue(int n) {return (ushort)Typp[n];}
- virtual int GetIntValue(int n) {return (int)Typp[n];}
- virtual uint GetUIntValue(int n) {return (uint)Typp[n];}
- virtual longlong GetBigintValue(int n) {return (longlong)Typp[n];}
- virtual ulonglong GetUBigintValue(int n) {return (ulonglong)Typp[n];}
- virtual double GetFloatValue(int n) {return (double)Typp[n];}
+
+ virtual char GetTinyValue(int n) {return (char)UnalignedRead(n);}
+ virtual uchar GetUTinyValue(int n) {return (uchar)UnalignedRead(n);}
+ virtual short GetShortValue(int n) {return (short)UnalignedRead(n);}
+ virtual ushort GetUShortValue(int n) {return (ushort)UnalignedRead(n);}
+ virtual int GetIntValue(int n) {return (int)UnalignedRead(n);}
+ virtual uint GetUIntValue(int n) {return (uint)UnalignedRead(n);}
+ virtual longlong GetBigintValue(int n) {return (longlong)UnalignedRead(n);}
+ virtual ulonglong GetUBigintValue(int n) {return (ulonglong)UnalignedRead(n);}
+ virtual double GetFloatValue(int n) {return (double)UnalignedRead(n);}
virtual char *GetCharString(char *p, int n);
- virtual void Reset(int n) {Typp[n] = 0;}
+ virtual void Reset(int n) {UnalignedWrite(n, 0);}
// Methods
using VALBLK::SetValue;
virtual void SetValue(PCSZ sp, int n);
virtual void SetValue(const char *sp, uint len, int n);
virtual void SetValue(short sval, int n)
- {Typp[n] = (TYPE)sval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
virtual void SetValue(ushort sval, int n)
- {Typp[n] = (TYPE)sval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
virtual void SetValue(int lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(uint lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(longlong lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(ulonglong lval, int n)
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
virtual void SetValue(double fval, int n)
- {Typp[n] = (TYPE)fval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)fval); SetNull(n, false);}
virtual void SetValue(char cval, int n)
- {Typp[n] = (TYPE)cval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
virtual void SetValue(uchar cval, int n)
- {Typp[n] = (TYPE)cval; SetNull(n, false);}
+ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
virtual void SetValue(PVAL valp, int n);
virtual void SetValue(PVBLK pv, int n1, int n2);
virtual void SetMin(PVAL valp, int n);
@@ -206,6 +208,17 @@ class TYPBLK : public VALBLK {
// Members
TYPE* const &Typp;
const char *Fmt;
+
+ // Unaligned access
+ TYPE UnalignedRead(int n) const {
+ TYPE result;
+ memcpy(&result, Typp + n, sizeof(TYPE));
+ return result;
+ }
+
+ void UnalignedWrite(int n, TYPE value) {
+ memcpy(Typp + n, &value, sizeof(TYPE));
+ }
}; // end of class TYPBLK
/***********************************************************************/
Description: Ensure groonga is built with libatomic
MIPS (and possibly other) platforms require linking against libatomic to
support 64-bit atomic integers. Groonga was failing to do so and all related
tests were failing with an atomics relocation error on MIPS.
Author: James Cowgill <jcowgill@debian.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: mips-groonga-atomic
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- mariadb-10.1.orig/storage/mroonga/vendor/groonga/CMakeLists.txt
+++ mariadb-10.1/storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -234,6 +234,8 @@ endmacro()
storage/mroonga/vendor/groonga/CMakeLists.txt | 2 ++
storage/mroonga/vendor/groonga/lib/CMakeLists.txt | 1 +
2 files changed, 3 insertions(+)
diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt
index e27070f..7f1899c 100644
--- a/storage/mroonga/vendor/groonga/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -238,6 +238,8 @@ endmacro()
include(build/ac_macros/check_headers.m4)
include(build/ac_macros/check_functions.m4)
......@@ -16,9 +20,11 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
ac_check_symbols(fpclassify math.h)
ac_check_lib(m fpclassify)
--- mariadb-10.1.orig/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
+++ mariadb-10.1/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
@@ -62,6 +62,7 @@ endif()
diff --git a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
index 6765261..6c13737 100644
--- a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
@@ -90,6 +90,7 @@ endif()
set_target_properties(libgroonga PROPERTIES OUTPUT_NAME "groonga")
set(GRN_ALL_LIBRARIES
......
Author: James Cowgill <jcowgill@debian.org>
Description: fix FTBFS on 32-bit mips*
Bug-Debian: #864298
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: mips-innobase-atomic
--- mariadb-10.1.orig/storage/innobase/include/os0sync.h
+++ mariadb-10.1/storage/innobase/include/os0sync.h
---
storage/innobase/include/os0sync.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/storage/innobase/include/os0sync.h b/storage/innobase/include/os0sync.h
index bb225c5..6520237 100644
--- a/storage/innobase/include/os0sync.h
+++ b/storage/innobase/include/os0sync.h
@@ -37,6 +37,7 @@ Created 9/6/1995 Heikki Tuuri
#include "univ.i"
......
Description: Fix DEFAULT_MACHINE on mips
The DEFAULT_MACHINE constant is calculated from the CMAKE_SYSTEM_PROCESSOR
variable which contains the processor which built mariadb. Since most Debian
buildds run on 64-bit hardware even though they build 32-bit binaries,
DEFAULT_MACHINE previously contained "mips64" on 32-bit builds. This confuses
some mroonga tests which rely on DEFAULT_MACHINE to detect 64-bitness.
.
This patch fixes the value of DEFAULT_MACHINE so it always contains just "mips"
on 32-bit mips builds.
Author: James Cowgill <jcowgill@debian.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: mips-machine
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- mariadb-10.1.orig/cmake/package_name.cmake
+++ mariadb-10.1/cmake/package_name.cmake
cmake/package_name.cmake | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index 4930a6b..7681f78 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -34,6 +34,10 @@ IF(NOT VERSION)
SET(DEFAULT_MACHINE "mips")
ENDIF()
......
Description: Remove various tests from unstable-tests which now pass on MIPS
Author: James Cowgill <jcowgill@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- mariadb-10.1.orig/mysql-test/unstable-tests
+++ mariadb-10.1/mysql-test/unstable-tests
@@ -149,7 +149,6 @@ engines/funcs.* : Not m
federated.federated_bug_585688 : MDEV-12907 - Valgrind
federated.federated_innodb : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
-federated.federated_partition : MDEV-10417 - Fails on Mips
federated.federated_transactions : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
federated.federatedx : MDEV-10617 - Wrong checksum, timeouts
federated.net_thd_crash-12725 : Added in 10.1.26
@@ -235,11 +234,10 @@ mroonga/storage.repair_table_no_index_fi
#----------------------------------------------------------------
-multi_source.gtid : MDEV-10417 - Fails on Mips
multi_source.info_logs : MDEV-10042 - Wrong result, MDEV-12629 - Valgrind warnings
multi_source.mdev-9544 : Added in 10.1.25
-multi_source.multisource : MDEV-10417 - Fails on Mips
multi_source.reset_slave : MDEV-10690 - wrong result
+multi_source.gtid : MDEV-10620 - Timeout in wait condition
multi_source.simple : MDEV-4633 - Wrong slave status output
multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_heartbeats
@@ -276,12 +274,9 @@ roles.show_create_database-10463 :
rpl.circular_serverid0 : Added in 10.1.26
rpl.last_insert_id : MDEV-10625 - warnings in error log
-rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips
-rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log
rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master
rpl.rpl_checksum_cache : MDEV-12173 - Unexpected error
-rpl.rpl_ddl : MDEV-10417 - Fails on Mips
rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result
rpl.rpl_extra_col_master_innodb : Include file modified in 10.1.26
rpl.rpl_extra_col_master_myisam : Include file modified in 10.1.26
@@ -294,14 +289,12 @@ rpl.rpl_gtid_crash :
rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings
rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings
rpl.rpl_gtid_until : MDEV-10625 - warnings in error log
-rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips
rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x
rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x
-rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips
rpl.rpl_loaddata : Include file modified in 10.1.26
rpl.rpl_loaddata_fatal : Include file modified in 10.1.26
rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog
-rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts, fails on Mips
+rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts
rpl.rpl_mdev-11092 : Include file modified in 10.1.26
rpl.rpl_mixed_binlog_max_cache_size : Include file modified in 10.1.26
rpl.rpl_old_decimal : Include file modified in 10.1.26
@@ -310,7 +303,6 @@ rpl.rpl_parallel_mdev6589 :
rpl.rpl_parallel_optimistic : MDEV-10511 - timeout; modified in 10.1.26
rpl.rpl_parallel_retry : MDEV-11119 - Server crash
rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables
-rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings
rpl.rpl_reset_slave_fail : Added in 10.1.26
rpl.rpl_rotate_logs : Include file modified in 10.1.26
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: mysql-test__db_test
## 50_mysql-test__db_test.dpatch by Christian Hammers <ch@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch 33_scripts__mysql_create_system_tables__no_test removes the
## DP: rights for anybody to connect to the test database but the test
## DP: suite depends on them.
--- mariadb-10.1.orig/mysql-test/mysql-test-run.pl
+++ mariadb-10.1/mysql-test/mysql-test-run.pl
@@ -3199,6 +3199,11 @@ sub mysql_install_db {
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
$bootstrap_sql_file);
---
mysql-test/mysql-test-run.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index ac9f493..7e7f116 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3203,6 +3203,10 @@ sub mysql_install_db {
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
$bootstrap_sql_file);
+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+
+
# Add test data for timezone - this is just a subset, on a real
# system these tables will be populated either by mysql_tzinfo_to_sql
# or by downloading the timezone table package from our website
# Add test data for timezone - this is just a subset, on a real
# system these tables will be populated either by mysql_tzinfo_to_sql
# or by downloading the timezone table package from our website
Description: Provides LSB headers for example initscript (Closes: #778762)
Author: Jan Wagner <waja@cyconet.org>
--- mariadb-10.1.orig/support-files/mysqld_multi.server.sh
+++ mariadb-10.1/support-files/mysqld_multi.server.sh
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: mysqld_multi.server_lsb-header
---
support-files/mysqld_multi.server.sh | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/support-files/mysqld_multi.server.sh b/support-files/mysqld_multi.server.sh
index 75908a5..9e0dd79 100644
--- a/support-files/mysqld_multi.server.sh
+++ b/support-files/mysqld_multi.server.sh
@@ -14,8 +14,24 @@
# Version 1.0
#
......
Description: Makes mysqld_multi reading conf.d (Closes: #778761)
Author: Jan Wagner <waja@cyconet.org>
--- mariadb-10.1.orig/scripts/mysqld_multi.sh
+++ mariadb-10.1/scripts/mysqld_multi.sh
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:28 +0200
Subject: mysqld_multi_confd
---
scripts/mysqld_multi.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index c6515a3..f50f0fe 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -497,6 +497,7 @@ sub list_defaults_files
'@prefix@/my.cnf',
($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef),
......
--- mariadb-10.1.orig/scripts/mytop.sh
+++ mariadb-10.1/scripts/mytop.sh
@@ -15,6 +15,7 @@ mytop - display MariaDB server performan
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: mytop-merge_src:mytop_improvements
---
scripts/mytop.sh | 184 +++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 132 insertions(+), 52 deletions(-)
diff --git a/scripts/mytop.sh b/scripts/mytop.sh
index 17a87e9..e8cc902 100644
--- a/scripts/mytop.sh
+++ b/scripts/mytop.sh
@@ -15,6 +15,7 @@ mytop - display MariaDB server performance info like `top'
use 5.005;
use strict;
use DBI;
......@@ -26,7 +36,7 @@
port => 3306,
resolve => 0,
slow => 10, # slow query time
@@ -125,6 +128,37 @@ if (!defined($my_print_defaults=my_which
@@ -125,6 +128,37 @@ if (!defined($my_print_defaults=my_which("my_print_defaults")))
unshift @ARGV, split "\n", `$my_print_defaults client mytop`;
......@@ -251,7 +261,7 @@
open P, "|$config{pager}" or die "$!";
print keys %{$data[0]};
@@ -1722,7 +1770,7 @@ Help for mytop version $main::VERSION by
@@ -1722,7 +1770,7 @@ Help for mytop version $main::VERSION by Jeremy D. Zawodny <${YELLOW}Jeremy\@Zaw
e - explain the query that a thread is running
E - display current replication error
f - show full query info for a given thread
......@@ -260,7 +270,7 @@
h - show only a specifc host's connections
H - toggle the mytop header
i - toggle the display of idle (sleeping) threads
@@ -1737,7 +1785,7 @@ Help for mytop version $main::VERSION by
@@ -1737,7 +1785,7 @@ Help for mytop version $main::VERSION by Jeremy D. Zawodny <${YELLOW}Jeremy\@Zaw
r - reset the status counters (via FLUSH STATUS on your server)
R - change reverse IP lookup
s - change the delay between screen updates
......@@ -269,7 +279,7 @@
t - switch to thread view (default)
u - show only a specific user
V - show variables
@@ -1745,7 +1793,7 @@ Help for mytop version $main::VERSION by
@@ -1745,7 +1793,7 @@ Help for mytop version $main::VERSION by Jeremy D. Zawodny <${YELLOW}Jeremy\@Zaw
! - Skip an error that has stopped replications (at your own risk)
L - show full queries (do not strip to terminal width)
......@@ -297,7 +307,7 @@
This version comes as part of the B<MariaDB> distribution. See B<http://mariadb.org/>.
@@ -1875,6 +1926,7 @@ In order for B<mytop> to function proper
@@ -1875,6 +1926,7 @@ In order for B<mytop> to function properly, you must have the
following:
* Perl 5.005 or newer
......@@ -305,7 +315,7 @@
* Getopt::Long
* DBI and DBD::mysql
* Term::ReadKey from CPAN
@@ -2016,46 +2068,49 @@ have two dashes `--'. Short arguments on
@@ -2016,46 +2068,49 @@ have two dashes `--'. Short arguments only have one '-'.
=over
......@@ -427,7 +437,7 @@
=head2 Shortcut Keys
The following keys perform various actions while B<mytop> is
@@ -2204,8 +2287,8 @@ running queries appear at the top of the
@@ -2204,8 +2287,8 @@ running queries appear at the top of the list.
=item B<I>
......@@ -449,7 +459,7 @@
=head1 BUGS
@@ -2292,9 +2375,6 @@ width. If you have fairly long database/
@@ -2292,9 +2375,6 @@ width. If you have fairly long database/user/host names the display
may appear odd. I have no good idea as to how best to deal with that
yet. Suggestions are welcome.
......
Description: Remove obsoleted systemd target
In Debian 9 the syslog.target is socket activated and thus obsolete to define.
For details see Lintian warning
https://lintian.debian.org/tags/systemd-service-file-refers-to-obsolete-target.html
Author: Otto Kekäläinen <otto@mariadb.org>
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Date: Thu, 10 Aug 2017 20:40:29 +0200
Subject: remove-systemd-obsolete-target
--- mariadb-10.1.orig/support-files/mariadb.service.in
+++ mariadb-10.1/support-files/mariadb.service.in
---
support-files/mariadb.service.in | 1 -
support-files/mariadb@.service.in | 1 -
2 files changed, 2 deletions(-)
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
index 6a307b2..7f40583 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
@@ -15,7 +15,6 @@
[Unit]
Description=MariaDB database server
......@@ -14,8 +19,10 @@ Author: Otto Kekäläinen <otto@mariadb.org>
[Install]
WantedBy=multi-user.target
--- mariadb-10.1.orig/support-files/mariadb@.service.in
+++ mariadb-10.1/support-files/mariadb@.service.in
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
index 410e743..02be006 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
@@ -20,7 +20,6 @@
[Unit]
Description=MariaDB database server
......
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