Skip to content

Commit

Permalink
Merge 10.9 into 10.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Feb 16, 2023
2 parents 7aace5d + 0d55914 commit 345356b
Show file tree
Hide file tree
Showing 326 changed files with 2,897 additions and 1,774 deletions.
4 changes: 2 additions & 2 deletions client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ class Load_log_processor
}

public:
Load_log_processor() {}
~Load_log_processor() {}
Load_log_processor() = default;
~Load_log_processor() = default;

int init()
{
Expand Down
6 changes: 3 additions & 3 deletions dbug/dbug.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#include <m_string.h>
#include <errno.h>
#ifdef HAVE_gcov
extern void __gcov_flush();
#include <gcov.h>
#endif

#ifndef DBUG_OFF
Expand Down Expand Up @@ -2212,7 +2212,7 @@ void _db_suicide_()
fprintf(stderr, "SIGKILL myself\n");
fflush(stderr);
#ifdef HAVE_gcov
__gcov_flush();
__gcov_dump();
#endif

retval= kill(getpid(), SIGKILL);
Expand Down Expand Up @@ -2262,7 +2262,7 @@ my_bool _db_my_assert(const char *file, int line, const char *msg)
fprintf(stderr, "%s:%d: assert: %s\n", file, line, msg);
fflush(stderr);
#ifdef HAVE_gcov
__gcov_flush();
__gcov_dump();
#endif
}
return a;
Expand Down
7 changes: 0 additions & 7 deletions debian/autobake-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ fi
case "${LSBNAME}"
in
# Debian
stretch)
# MDEV-16525 libzstd-dev-1.1.3 minimum version
sed -e '/libzstd-dev/d' \
-e 's/libcurl4/libcurl3/g' -i debian/control
remove_rocksdb_tools
disable_pmem
;&
buster)
disable_libfmt
replace_uring_with_aio
Expand Down
32 changes: 22 additions & 10 deletions extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ struct my_option xb_client_options[]= {

{"rsync", OPT_RSYNC,
"Uses the rsync utility to optimize local file "
"transfers. When this option is specified, innobackupex uses rsync "
"transfers. When this option is specified, " XB_TOOL_NAME " uses rsync "
"to copy all non-InnoDB files instead of spawning a separate cp for "
"each file, which can be much faster for servers with a large number "
"of databases or tables. This option cannot be used together with "
Expand Down Expand Up @@ -1398,7 +1398,7 @@ struct my_option xb_client_options[]= {

{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
"This option specifies which types of queries are allowed to complete "
"before innobackupex will issue the global lock. Default is all.",
"before " XB_TOOL_NAME " will issue the global lock. Default is all.",
(uchar *) &opt_lock_wait_query_type, (uchar *) &opt_lock_wait_query_type,
&query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0,
0},
Expand All @@ -1418,26 +1418,26 @@ struct my_option xb_client_options[]= {
NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},

{"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT,
"This option specifies the number of seconds innobackupex waits "
"This option specifies the number of seconds " XB_TOOL_NAME " waits "
"between starting FLUSH TABLES WITH READ LOCK and killing those "
"queries that block it. Default is 0 seconds, which means "
"innobackupex will not attempt to kill any queries.",
XB_TOOL_NAME " will not attempt to kill any queries.",
(uchar *) &opt_kill_long_queries_timeout,
(uchar *) &opt_kill_long_queries_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0,
0, 0, 0, 0},

{"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
"This option specifies time in seconds that innobackupex should wait "
"This option specifies time in seconds that " XB_TOOL_NAME " should wait "
"for queries that would block FTWRL before running it. If there are "
"still such queries when the timeout expires, innobackupex terminates "
"with an error. Default is 0, in which case innobackupex does not "
"still such queries when the timeout expires, " XB_TOOL_NAME " terminates "
"with an error. Default is 0, in which case " XB_TOOL_NAME " does not "
"wait for queries to complete and starts FTWRL immediately.",
(uchar *) &opt_lock_wait_timeout, (uchar *) &opt_lock_wait_timeout, 0,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},

{"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD,
"This option specifies the query run time threshold which is used by "
"innobackupex to detect long-running queries with a non-zero value "
XB_TOOL_NAME " to detect long-running queries with a non-zero value "
"of --ftwrl-wait-timeout. FTWRL is not started until such "
"long-running queries exist. This option has no effect if "
"--ftwrl-wait-timeout is 0. Default value is 60 seconds.",
Expand Down Expand Up @@ -1918,6 +1918,17 @@ xb_get_one_option(const struct my_option *opt,
break;

case OPT_INNODB_FLUSH_METHOD:
#ifdef _WIN32
/* From: storage/innobase/handler/ha_innodb.cc:innodb_init_params */
switch (srv_file_flush_method) {
case SRV_ALL_O_DIRECT_FSYNC + 1 /* "async_unbuffered"="unbuffered" */:
srv_file_flush_method= SRV_ALL_O_DIRECT_FSYNC;
break;
case SRV_ALL_O_DIRECT_FSYNC + 2 /* "normal"="fsync" */:
srv_file_flush_method= SRV_FSYNC;
break;
}
#endif
ut_a(srv_file_flush_method
<= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC));
ADD_PRINT_PARAM_OPT(innodb_flush_method_names[srv_file_flush_method]);
Expand Down Expand Up @@ -3104,7 +3115,8 @@ static bool xtrabackup_copy_logfile()
mysql_mutex_lock(&recv_sys.mutex);
}

msg(">> log scanned up to (" LSN_PF ")", recv_sys.lsn);
if (verbose)
msg(">> log scanned up to (" LSN_PF ")", recv_sys.lsn);
return false;
}

Expand Down Expand Up @@ -3147,7 +3159,7 @@ static void log_copying_thread()
my_thread_end();
}

/** whether io_watching_thread() is active; protected by log_sys.mutex */
/** whether io_watching_thread() is active; protected by recv_sys.mutex */
static bool have_io_watching_thread;

/* io throttle watching (rough) */
Expand Down
2 changes: 2 additions & 0 deletions extra/mariabackup/xtrabackup.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#include "changed_page_bitmap.h"
#include <set>

#define XB_TOOL_NAME "mariadb-backup"

struct xb_delta_info_t
{
xb_delta_info_t(ulint page_size, ulint zip_size, uint32_t space_id)
Expand Down
3 changes: 3 additions & 0 deletions extra/wolfssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ IF(MSVC_INTEL)
SET(WOLFSSL_X86_64_BUILD 1)
SET(HAVE_INTEL_RDSEED 1)
SET(HAVE_INTEL_RDRAND 1)
ELSEIF(CMAKE_ASM_COMPILER_ID MATCHES "Clang" AND CMAKE_VERSION VERSION_LESS 3.16)

# WolfSSL 5.5.4 bug workaround below does not work, due to some CMake bug
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
SET(WOLFSSL_X86_64_BUILD 1)
IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
Expand Down
7 changes: 3 additions & 4 deletions include/ilist.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
// Derive your class from this struct to insert to a linked list.
template <class Tag= void> struct ilist_node
{
ilist_node() noexcept
#ifndef DBUG_OFF
: next(NULL), prev(NULL)
ilist_node() noexcept : next(NULL), prev(NULL) {}
#else
ilist_node() = default;
#endif
{
}

ilist_node(ilist_node *next, ilist_node *prev) noexcept
: next(next), prev(prev)
Expand Down
2 changes: 1 addition & 1 deletion include/my_atomic_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ template <typename Type> class Atomic_relaxed
Atomic_relaxed(const Atomic_relaxed<Type> &rhs)
{ m.store(rhs, std::memory_order_relaxed); }
Atomic_relaxed(Type val) : m(val) {}
Atomic_relaxed() {}
Atomic_relaxed() = default;

Type load(std::memory_order o= std::memory_order_relaxed) const
{ return m.load(o); }
Expand Down
2 changes: 1 addition & 1 deletion include/my_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ template <typename Type> class Atomic_counter
Atomic_counter(const Atomic_counter<Type> &rhs)
{ m_counter.store(rhs, std::memory_order_relaxed); }
Atomic_counter(Type val): m_counter(val) {}
Atomic_counter() {}
Atomic_counter() = default;

Type operator++(int) { return add(1); }
Type operator--(int) { return sub(1); }
Expand Down
2 changes: 1 addition & 1 deletion include/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ template <class ElementType> class span

span(const span &other) : data_(other.data_), size_(other.size_) {}

~span(){};
~span() = default;

span &operator=(const span &other)
{
Expand Down
18 changes: 18 additions & 0 deletions mysql-test/include/ctype_casefolding.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
# Uncode code points that have a variable length case mapping in utf8
# (e.g. LOWER('2-byte-character') -> '3-byte-character'
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
DROP TABLE case_folding;
54 changes: 54 additions & 0 deletions mysql-test/main/ctype_ldml.result
Original file line number Diff line number Diff line change
Expand Up @@ -3041,13 +3041,61 @@ SELECT 'chž'< 'i';
SELECT 'a' COLLATE utf8_czech_test_bad_w2;
ERROR HY000: Unknown collation: 'utf8_czech_test_bad_w2'
#
# End of 10.2 tests
#
#
# Start of 10.3 tests
#
#
# MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8
#
SET NAMES utf8mb4 COLLATE utf8mb4_test_520_nopad_ci;
CREATE OR REPLACE TABLE case_folding AS SELECT 0 AS code, SPACE(32) AS c LIMIT 0;
SHOW CREATE TABLE case_folding;
Table Create Table
case_folding CREATE TABLE `case_folding` (
`code` int(1) NOT NULL,
`c` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_test_520_nopad_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO case_folding (code) VALUES
(0x23A),
(0x23E),
(0x23F),
(0x240),
(0x250),
(0x251),
(0x252),
(0x26B),
(0x271),
(0x27D);
UPDATE case_folding SET c=CHAR(code USING ucs2);
SELECT HEX(code), HEX(LOWER(c)), HEX(UPPER(c)), c FROM case_folding;
HEX(code) HEX(LOWER(c)) HEX(UPPER(c)) c
23A E2B1A5 C8BA Ⱥ
23E E2B1A6 C8BE Ⱦ
23F C8BF E2B1BE ȿ
240 C980 E2B1BF ɀ
250 C990 E2B1AF ɐ
251 C991 E2B1AD ɑ
252 C992 E2B1B0 ɒ
26B C9AB E2B1A2 ɫ
271 C9B1 E2B1AE ɱ
27D C9BD E2B1A4 ɽ
DROP TABLE case_folding;
#
# End of 10.3 tests
#
#
# MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO
#
SHOW COLLATION LIKE 'latin1_test_replace';
Collation Charset Id Default Compiled Sortlen
SELECT 'foo' = 'foo ' COLLATE latin1_test_replace;
ERROR HY000: Unknown collation: 'latin1_test_replace'
#
# End of 10.5 tests
#
#
# MDEV-27042 UCA: Resetting contractions to ignorable does not work well
#
CREATE TABLE t1 (
Expand Down Expand Up @@ -3082,6 +3130,9 @@ tèl.123 10020E8B0F2E025D0E2A0E2B0E2C
tex.123 10020E8B105A025D0E2A0E2B0E2C
DROP TABLE t1;
#
# End of 10.8 tests
#
#
# MDEV-27009 Add UCA-14.0.0 collations
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_test01_as_ci, comment VARCHAR(128));
Expand Down Expand Up @@ -3178,3 +3229,6 @@ is_400 0
is_520 0
is_1400 1
DROP TABLE t1;
#
# End of 10.10 tests
#
31 changes: 31 additions & 0 deletions mysql-test/main/ctype_ldml.test
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,27 @@ SELECT 'chž'< 'i';
--error ER_UNKNOWN_COLLATION
SELECT 'a' COLLATE utf8_czech_test_bad_w2;

--echo #
--echo # End of 10.2 tests
--echo #


--echo #
--echo # Start of 10.3 tests
--echo #

--echo #
--echo # MDEV-30556 UPPER() returns an empty string for U+0251 in Unicode-5.2.0+ collations for utf8
--echo #

SET NAMES utf8mb4 COLLATE utf8mb4_test_520_nopad_ci;
--source include/ctype_casefolding.inc


--echo #
--echo # End of 10.3 tests
--echo #


--echo #
--echo # MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO
Expand All @@ -620,6 +641,9 @@ SHOW COLLATION LIKE 'latin1_test_replace';
--error ER_UNKNOWN_COLLATION
SELECT 'foo' = 'foo ' COLLATE latin1_test_replace;

--echo #
--echo # End of 10.5 tests
--echo #

--echo #
--echo # MDEV-27042 UCA: Resetting contractions to ignorable does not work well
Expand All @@ -640,6 +664,9 @@ SELECT * FROM t1 WHERE phone<>'123' ORDER BY BINARY phone;
SELECT phone, HEX(WEIGHT_STRING(phone)) FROM t1 ORDER BY phone, BINARY phone;
DROP TABLE t1;

--echo #
--echo # End of 10.8 tests
--echo #

--echo #
--echo # MDEV-27009 Add UCA-14.0.0 collations
Expand Down Expand Up @@ -669,3 +696,7 @@ FROM t1
ORDER BY a, HEX(a);
--horizontal_results
DROP TABLE t1;

--echo #
--echo # End of 10.10 tests
--echo #
8 changes: 4 additions & 4 deletions mysql-test/main/ctype_uca.result
Original file line number Diff line number Diff line change
Expand Up @@ -8204,7 +8204,7 @@ INSERT INTO t1 VALUES (_utf32 0x2CEE);
SELECT hex(c), hex(lower(c)), hex(upper(c)), hex(weight_string(c)), c
FROM t1 ORDER BY c, BINARY c;
hex(c) hex(lower(c)) hex(upper(c)) hex(weight_string(c)) c
C8BA C8BA 1214 Ⱥ
C8BA E2B1A5 C8BA 1214 Ⱥ
E2B1A5 E2B1A5 C8BA 1214 ⱥ
C680 C680 C983 122D ƀ
C983 C680 C983 122D Ƀ
Expand All @@ -8229,19 +8229,19 @@ E2B1AA E2B1AA E2B1A9 1328 ⱪ
C8BD C69A C8BD 133B Ƚ
E2B1A0 E2B1A1 E2B1A0 133F Ⱡ
E2B1A1 E2B1A1 E2B1A0 133F ⱡ
C9AB C9AB 1340 ɫ
C9AB C9AB E2B1A2 1340 ɫ
E2B1A2 C9AB E2B1A2 1340 Ɫ
E1B5BD E1B5BD E2B1A3 13B8 ᵽ
E2B1A3 E1B5BD E2B1A3 13B8 Ᵽ
C98A C98B C98A 13D2 Ɋ
C98B C98B C98A 13D2 ɋ
C98C C98D C98C 13E4 Ɍ
C98D C98D C98C 13E4 ɍ
C9BD C9BD 13FC ɽ
C9BD C9BD E2B1A4 13FC ɽ
E2B1A4 C9BD E2B1A4 13FC Ɽ
EA9CA8 EA9CA9 EA9CA8 143314AD Ꜩ
EA9CA9 EA9CA9 EA9CA8 143314AD ꜩ
C8BE C8BE 143C Ⱦ
C8BE E2B1A6 C8BE 143C Ⱦ
E2B1A6 E2B1A6 C8BE 143C ⱦ
C984 CA89 C984 145B Ʉ
CA89 CA89 C984 145B ʉ
Expand Down
Loading

0 comments on commit 345356b

Please sign in to comment.