1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.10 into 10.11

This commit is contained in:
Marko Mäkelä
2023-02-16 11:41:18 +02:00
361 changed files with 2938 additions and 1939 deletions

View File

@ -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()
{

View File

@ -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
@ -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);
@ -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;

View File

@ -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

View File

@ -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 "
@ -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},
@ -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.",
@ -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]);
@ -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;
}
@ -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) */

View File

@ -27,6 +27,7 @@ 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"
#define XB_HISTORY_TABLE "mysql.mariadb_backup_history"
struct xb_delta_info_t

View File

@ -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)

View File

@ -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)

View File

@ -39,7 +39,7 @@ public:
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); }

View File

@ -31,7 +31,7 @@ public:
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); }

View File

@ -81,7 +81,7 @@ public:
span(const span &other) : data_(other.data_), size_(other.size_) {}
~span(){};
~span() = default;
span &operator=(const span &other)
{

View File

@ -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;

View File

@ -3041,6 +3041,51 @@ 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';
@ -3048,6 +3093,9 @@ 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 (
@ -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));
@ -3178,3 +3229,6 @@ is_400 0
is_520 0
is_1400 1
DROP TABLE t1;
#
# End of 10.10 tests
#

View File

@ -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
@ -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
@ -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
@ -669,3 +696,7 @@ FROM t1
ORDER BY a, HEX(a);
--horizontal_results
DROP TABLE t1;
--echo #
--echo # End of 10.10 tests
--echo #

View File

@ -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 Ƀ
@ -8229,7 +8229,7 @@ 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 Ᵽ
@ -8237,11 +8237,11 @@ 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 ʉ

View File

@ -588,6 +588,180 @@ DROP TABLE t1;
# 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 utf8mb3 COLLATE utf8mb3_unicode_ci /*Unicode-4.0 folding*/;
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 utf8mb3 COLLATE utf8mb3_unicode_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 C8BA C8BA Ⱥ
23E C8BE C8BE Ⱦ
23F C8BF C8BF ȿ
240 C980 C980 ɀ
250 C990 C990 ɐ
251 C991 C991 ɑ
252 C992 C992 ɒ
26B C9AB C9AB ɫ
271 C9B1 C9B1 ɱ
27D C9BD C9BD ɽ
DROP TABLE case_folding;
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_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 utf8mb3 COLLATE utf8mb3_unicode_520_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;
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_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 utf8mb3 COLLATE utf8mb3_unicode_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;
SET NAMES utf8mb3 COLLATE utf8mb3_myanmar_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 utf8mb3 COLLATE utf8mb3_myanmar_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;
SET NAMES utf8mb3 COLLATE utf8mb3_thai_520_w2;
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 utf8mb3 COLLATE utf8mb3_thai_520_w2 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
#
#
# Start of 10.10 tests
#
#

View File

@ -22,6 +22,35 @@ SET NAMES utf8 COLLATE utf8_unicode_nopad_ci;
--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 utf8mb3 COLLATE utf8mb3_unicode_ci /*Unicode-4.0 folding*/;
--source include/ctype_casefolding.inc
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_ci;
--source include/ctype_casefolding.inc
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_520_nopad_ci;
--source include/ctype_casefolding.inc
SET NAMES utf8mb3 COLLATE utf8mb3_myanmar_ci;
--source include/ctype_casefolding.inc
SET NAMES utf8mb3 COLLATE utf8mb3_thai_520_w2;
--source include/ctype_casefolding.inc
--echo #
--echo # End of 10.3 tests
--echo #
--echo #
--echo # Start of 10.10 tests
--echo #
@ -47,7 +76,6 @@ SELECT f1();
DROP FUNCTION f1;
SET NAMES utf8mb3;
--echo #
--echo # End of 10.10 tests
--echo #

View File

@ -6606,7 +6606,178 @@ SET NAMES utf8mb4;
# End of 10.2 tests
#
#
# End of 10.9 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_unicode_ci /*Unicode-4.0 folding*/;
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_unicode_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 C8BA C8BA Ⱥ
23E C8BE C8BE Ⱦ
23F C8BF C8BF ȿ
240 C980 C980 ɀ
250 C990 C990 ɐ
251 C991 C991 ɑ
252 C992 C992 ɒ
26B C9AB C9AB ɫ
271 C9B1 C9B1 ɱ
27D C9BD C9BD ɽ
DROP TABLE case_folding;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_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_unicode_520_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;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_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_unicode_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;
SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_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_myanmar_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;
SET NAMES utf8mb4 COLLATE utf8mb4_thai_520_w2;
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_thai_520_w2 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-27009 Add UCA-14.0.0 collations
@ -11208,5 +11379,5 @@ DROP TABLE t1;
DROP PROCEDURE exec_verbose;
DROP PROCEDURE test_styles;
#
# End of 10.9 tests
# End of 10.10 tests
#

View File

@ -109,8 +109,33 @@ SET NAMES utf8mb4;
--echo # End of 10.2 tests
--echo #
--echo #
--echo # End of 10.9 tests
--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_unicode_ci /*Unicode-4.0 folding*/;
--source include/ctype_casefolding.inc
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci;
--source include/ctype_casefolding.inc
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci;
--source include/ctype_casefolding.inc
SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_ci;
--source include/ctype_casefolding.inc
SET NAMES utf8mb4 COLLATE utf8mb4_thai_520_w2;
--source include/ctype_casefolding.inc
--echo #
--echo # End of 10.3 tests
--echo #
--echo #
@ -402,5 +427,5 @@ DROP PROCEDURE exec_verbose;
DROP PROCEDURE test_styles;
--echo #
--echo # End of 10.9 tests
--echo # End of 10.10 tests
--echo #

View File

@ -2,7 +2,7 @@ SET DEBUG_SYNC= 'RESET';
DROP TABLE IF EXISTS t1;
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: ''
debug_sync ON - current signals: ''
SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2';
SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 HIT_LIMIT 3';
@ -150,34 +150,34 @@ SET @myvar= 'now SIGNAL from_myvar';
SET DEBUG_SYNC= @myvar;
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 'from_myvar'
debug_sync ON - current signals: 'from_myvar'
SET DEBUG_SYNC= LEFT('now SIGNAL from_function_cut_here', 24);
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 'from_function'
debug_sync ON - current signals: 'from_myvar,from_function'
SET DEBUG_SYNC= 'now SIGNAL something';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 'something'
debug_sync ON - current signals: 'something,from_function,from_myvar'
SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
Warnings:
Warning #### debug sync point wait timed out
SET DEBUG_SYNC= 'now SIGNAL nothing';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 'nothing'
debug_sync ON - current signals: 'something,from_function,nothing,from_myvar'
SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
SET DEBUG_SYNC= 'now SIGNAL something EXECUTE 0';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 'nothing'
debug_sync ON - current signals: 'something,from_function,from_myvar'
SET DEBUG_SYNC= 'now WAIT_FOR anotherthing TIMEOUT 0 EXECUTE 0';
SET DEBUG_SYNC= 'now HIT_LIMIT 1';
ERROR HY000: debug sync point hit limit reached
SET DEBUG_SYNC= 'RESET';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: ''
debug_sync ON - current signals: ''
SET DEBUG_SYNC= 'p1abcd SIGNAL s1 EXECUTE 2';
SET DEBUG_SYNC= 'p2abc SIGNAL s2 EXECUTE 2';
SET DEBUG_SYNC= 'p9abcdef SIGNAL s9 EXECUTE 2';
@ -190,23 +190,30 @@ SET DEBUG_SYNC= 'p3abcdef SIGNAL s3 EXECUTE 2';
SET DEBUG_SYNC= 'p4a TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's4'
debug_sync ON - current signals: 's4'
SET DEBUG_SYNC= 'p1abcd TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's1'
debug_sync ON - current signals: 's4,s1'
SET DEBUG_SYNC= 'p7 TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's7'
debug_sync ON - current signals: 's1,s7,s4'
SET DEBUG_SYNC= 'p9abcdef TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's9'
debug_sync ON - current signals: 's1,s7,s4,s9'
SET DEBUG_SYNC= 'p3abcdef TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's3'
debug_sync ON - current signals: 's1,s3,s4,s9,s7'
SET DEBUG_SYNC= 'now WAIT_FOR s9';
SET DEBUG_SYNC= 'now WAIT_FOR s1';
SET DEBUG_SYNC= 'now WAIT_FOR s4';
SET DEBUG_SYNC= 'now WAIT_FOR s7';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signals: 's3'
SET DEBUG_SYNC= 'p1abcd CLEAR';
SET DEBUG_SYNC= 'p2abc CLEAR';
SET DEBUG_SYNC= 'p5abcde CLEAR';
@ -219,19 +226,19 @@ SET DEBUG_SYNC= 'p7 CLEAR';
SET DEBUG_SYNC= 'p1abcd TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's3'
debug_sync ON - current signals: 's3'
SET DEBUG_SYNC= 'p7 TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's3'
debug_sync ON - current signals: 's3'
SET DEBUG_SYNC= 'p9abcdef TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: 's3'
debug_sync ON - current signals: 's3'
SET DEBUG_SYNC= 'RESET';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signal: ''
debug_sync ON - current signals: ''
CREATE USER mysqltest_1@localhost;
GRANT SUPER ON *.* TO mysqltest_1@localhost;
connect con1,localhost,mysqltest_1,,;
@ -292,4 +299,24 @@ disconnect con1;
disconnect con2;
connection default;
DROP TABLE t1;
#
# Test NO_CLEAR_EVENT flag. The signal should still be visible after
# the wait has completed succesfully.
#
SET DEBUG_SYNC= 'now SIGNAL s1';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signals: 's1'
SET DEBUG_SYNC= 'now WAIT_FOR s1 NO_CLEAR_EVENT';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signals: 's1'
SET DEBUG_SYNC= 'now WAIT_FOR s1';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signals: ''
SET DEBUG_SYNC= 'now SIGNAL s1,s2,s5,s7';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
Variable_name Value
debug_sync ON - current signals: 's2,s7,s1,s5'
SET DEBUG_SYNC= 'RESET';

View File

@ -231,15 +231,12 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
# immediately after setting of the DEBUG_SYNC variable.
# So it is executed before the SET statement ends.
#
# NOTE: There is only one global signal (say "signal post" or "flag mast").
# A SIGNAL action writes its signal into it ("sets a flag").
# The signal persists until explicitly overwritten.
# NOTE: There can be multiple active signals at the same time.
# A SIGNAL action appends its signal into signals set.
# The signal persists until waited on.
# To avoid confusion for later tests, it is recommended to clear
# the signal by signalling "empty" ("setting the 'empty' flag"):
# SET DEBUG_SYNC= 'now SIGNAL empty';
# Preferably you can reset the whole facility with:
# the signal set by running
# SET DEBUG_SYNC= 'RESET';
# The signal is then '' (really empty) which connot be done otherwise.
#
#
@ -298,6 +295,16 @@ SET DEBUG_SYNC= 'p9abcdef TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
SET DEBUG_SYNC= 'p3abcdef TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
#
# Wait for all signals currently active except s3.
#
SET DEBUG_SYNC= 'now WAIT_FOR s9';
SET DEBUG_SYNC= 'now WAIT_FOR s1';
SET DEBUG_SYNC= 'now WAIT_FOR s4';
SET DEBUG_SYNC= 'now WAIT_FOR s7';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
#
# Clear the actions.
#
@ -320,7 +327,7 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
SET DEBUG_SYNC= 'p9abcdef TEST';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
#
# Now cleanup. Actions are clear already, but signal needs to be cleared.
# Now cleanup. Actions are clear already, but s3 signal needs to be cleared.
#
SET DEBUG_SYNC= 'RESET';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
@ -418,10 +425,24 @@ disconnect con2;
connection default;
DROP TABLE t1;
--echo #
--echo # Test NO_CLEAR_EVENT flag. The signal should still be visible after
--echo # the wait has completed succesfully.
--echo #
SET DEBUG_SYNC= 'now SIGNAL s1';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
SET DEBUG_SYNC= 'now WAIT_FOR s1 NO_CLEAR_EVENT';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
SET DEBUG_SYNC= 'now WAIT_FOR s1';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
SET DEBUG_SYNC= 'now SIGNAL s1,s2,s5,s7';
SHOW VARIABLES LIKE 'DEBUG_SYNC';
#
# Cleanup after test case.
# Otherwise signal would contain 'flushed' here,
# which could confuse the next test.
# Otherwise signal would confuse the next test.
#
SET DEBUG_SYNC= 'RESET';

View File

@ -525,3 +525,35 @@ DELETE v2 FROM v2;
ERROR HY000: Can not delete from join view 'test.v2'
DROP VIEW v2, v1;
DROP TABLE t1, t2;
End of 5.5 tests
#
# MDEV-30586: DELETE with WHERE containing nested subquery
# with set function aggregated in outer subquery
#
create table t1 (a int);
insert into t1 values (3), (7), (1);
create table t2 (b int);
insert into t2 values (2), (1), (4), (7);
create table t3 (a int, b int);
insert into t3 values (2,10), (7,30), (2,30), (1,10), (7,40);
select * from t1
where t1.a in (select t3.a from t3 group by t3.a
having t3.a > any (select t2.b from t2
where t2.b*10 < sum(t3.b)));
a
7
delete from t1
where t1.a in (select t3.a from t3 group by t3.a
having t3.a > any (select t2.b from t2
where t2.b*10 < sum(t3.b)));
select * from t1
where t1.a in (select t3.a from t3 group by t3.a
having t3.a > any (select t2.b from t2
where t2.b*10 < sum(t3.b)));
a
update t1 set t1.a=t1.a+10
where t1.a in (select t3.a from t3 group by t3.a
having t3.a > any (select t2.b from t2
where t2.b*10 < sum(t3.b)));
drop table t1,t2,t3;
End of 10.4 tests

View File

@ -582,3 +582,44 @@ DELETE v2 FROM v2;
DROP VIEW v2, v1;
DROP TABLE t1, t2;
--echo End of 5.5 tests
--echo #
--echo # MDEV-30586: DELETE with WHERE containing nested subquery
--echo # with set function aggregated in outer subquery
--echo #
create table t1 (a int);
insert into t1 values (3), (7), (1);
create table t2 (b int);
insert into t2 values (2), (1), (4), (7);
create table t3 (a int, b int);
insert into t3 values (2,10), (7,30), (2,30), (1,10), (7,40);
let $c=
t1.a in (select t3.a from t3 group by t3.a
having t3.a > any (select t2.b from t2
where t2.b*10 < sum(t3.b)));
eval
select * from t1
where $c;
eval
delete from t1
where $c;
eval
select * from t1
where $c;
eval
update t1 set t1.a=t1.a+10
where $c;
drop table t1,t2,t3;
--echo End of 10.4 tests

View File

@ -16,3 +16,61 @@ ERROR 42S02: Table 'test.t2' doesn't exist
show status like "Empty_queries";
Variable_name Value
Empty_queries 2
# End of 4.1 tests
#
# MDEV-30333 Wrong result with not_null_range_scan and LEFT JOIN with empty table
#
set @save_optimizer_switch=@@optimizer_switch;
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
INSERT INTO t1 (b) VALUES (1),(2);
CREATE TABLE t2 (c INT) ENGINE=MyISAM;
SET optimizer_switch= 'not_null_range_scan=off';
explain extended SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where; Using filesort
Warnings:
Note 1003 select `test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` is null order by `test`.`t1`.`b`
SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
b
1
2
SET optimizer_switch = 'not_null_range_scan=on';
explain extended SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where; Using filesort
Warnings:
Note 1003 select `test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` is null order by `test`.`t1`.`b`
SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
b
1
2
flush tables;
SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
b
1
2
drop table t1,t2;
# Second test in MDEV-30333
CREATE TABLE t1 (a int, b varchar(10)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (69,'foo'),(71,'bar');
CREATE TABLE t2 (c int) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1),(2);
CREATE TABLE t3 (d int, e int, KEY(e)) ENGINE=MyISAM;
SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t3.e = t3.d ON 1;
a b c d e
69 foo 1 NULL NULL
71 bar 1 NULL NULL
69 foo 2 NULL NULL
71 bar 2 NULL NULL
SET optimizer_switch = 'not_null_range_scan=on';
SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t3.e = t3.d ON 1;
a b c d e
69 foo 1 NULL NULL
71 bar 1 NULL NULL
69 foo 2 NULL NULL
71 bar 2 NULL NULL
DROP TABLE t1, t2, t3;
set @@optimizer_switch=@save_optimizer_switch;
End of 10.5 tests

View File

@ -21,4 +21,38 @@ drop table t1;
select * from t2;
show status like "Empty_queries";
# End of 4.1 tests
--echo # End of 4.1 tests
--echo #
--echo # MDEV-30333 Wrong result with not_null_range_scan and LEFT JOIN with empty table
--echo #
set @save_optimizer_switch=@@optimizer_switch;
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
INSERT INTO t1 (b) VALUES (1),(2);
CREATE TABLE t2 (c INT) ENGINE=MyISAM;
SET optimizer_switch= 'not_null_range_scan=off'; # Default
explain extended SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
SET optimizer_switch = 'not_null_range_scan=on';
explain extended SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
flush tables;
SELECT b FROM t1 LEFT JOIN t2 ON t2.c = a WHERE a IS NULL ORDER BY b;
drop table t1,t2;
--echo # Second test in MDEV-30333
CREATE TABLE t1 (a int, b varchar(10)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (69,'foo'),(71,'bar');
CREATE TABLE t2 (c int) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1),(2);
CREATE TABLE t3 (d int, e int, KEY(e)) ENGINE=MyISAM;
SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t3.e = t3.d ON 1;
SET optimizer_switch = 'not_null_range_scan=on';
SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t3.e = t3.d ON 1;
DROP TABLE t1, t2, t3;
set @@optimizer_switch=@save_optimizer_switch;
--echo End of 10.5 tests

View File

@ -1378,3 +1378,31 @@ a
bar
foo
DROP TABLE t;
#
# MDEV-30324: Wrong result upon SELECT DISTINCT .. WITH TIES using index
#
CREATE TABLE t1 (a int, b char(3), KEY (a));
INSERT INTO t1 VALUES (2,'foo'),(3,'bar'),(3,'bar'),(3,'zzz');
EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 1 ROWS WITH TIES;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 1 Using temporary
SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 1 ROWS WITH TIES;
a b
2 foo
EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 2 ROWS WITH TIES;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 2 Using temporary
SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 2 ROWS WITH TIES;
a b
2 foo
3 bar
3 zzz
EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 3 ROWS WITH TIES;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 3 ROWS WITH TIES;
a b
2 foo
3 bar
3 zzz
DROP TABLE t1;

View File

@ -1059,3 +1059,22 @@ SELECT a FROM t ORDER BY a FETCH FIRST 2 ROWS WITH TIES;
# Cleanup
DROP TABLE t;
--echo #
--echo # MDEV-30324: Wrong result upon SELECT DISTINCT .. WITH TIES using index
--echo #
CREATE TABLE t1 (a int, b char(3), KEY (a));
INSERT INTO t1 VALUES (2,'foo'),(3,'bar'),(3,'bar'),(3,'zzz');
EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 1 ROWS WITH TIES;
--sorted_result
SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 1 ROWS WITH TIES;
EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 2 ROWS WITH TIES;
--sorted_result
SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 2 ROWS WITH TIES;
EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 3 ROWS WITH TIES;
--sorted_result
SELECT DISTINCT a, b FROM t1 ORDER BY a FETCH FIRST 3 ROWS WITH TIES;
# Cleanup
DROP TABLE t1;

View File

@ -1623,6 +1623,21 @@ id doc
{"$oid":"611c0a463b150154132f6636"} { "_id" : { "$oid" : "611c0a463b150154132f6636" }, "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : 1.0 } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] }
DROP TABLE arrNestTest;
#
# MDEV-30412 JSON_OBJECTAGG doesn't escape double quote in key
#
SELECT JSON_OBJECTAGG('"', 1);
JSON_OBJECTAGG('"', 1)
{"\"":1}
SELECT JSON_OBJECTAGG('\"', 1);
JSON_OBJECTAGG('\"', 1)
{"\"":1}
SELECT JSON_OBJECTAGG('\\', 1);
JSON_OBJECTAGG('\\', 1)
{"\\":1}
#
# End of 10.5 tests
#
#
# MDEV-26054 Server crashes in Item_func_json_arrayagg::get_str_from_field
#
CREATE TABLE t (a VARCHAR(8));
@ -1649,7 +1664,7 @@ JSON_INSERT(JSON_OBJECT(l1, l2, l3, l4), '$.k3', 'v3') JSON_SET(JSON_OBJECT(l1,
{"k1": "v1", "k2": "v2", "k3": "v3"} {"k1": "v1", "k2": "new v2"} {"k1": "v1", "k2": "new v2"}
DROP TABLE t;
#
# End of 10.5 tests
# End of 10.6 tests
#
#
# Beginning of 10.9 tests
@ -2536,9 +2551,6 @@ JSON_EXTRACT(j, '$[*]')
[{"key1": 3, "key2": 3}, {"key3": 3, "key4": 3}, {"key5": 3}]
DROP TABLE t1;
#
# End of 10.9 Test
#
#
# MDEV-29381: JSON paths containing dashes are reported as syntax errors in procedures
#
SELECT JSON_EXTRACT('{ "my-key": 1 }', '$."my-key"');
@ -2547,3 +2559,6 @@ JSON_EXTRACT('{ "my-key": 1 }', '$."my-key"')
SELECT JSON_EXTRACT('{ "my-key": 1 }', '$.my-key');
JSON_EXTRACT('{ "my-key": 1 }', '$.my-key')
1
#
# End of 10.9 Test
#

View File

@ -1067,6 +1067,18 @@ INSERT INTO test.arrNestTest (doc) VALUES ('{ "_id" : { "$oid" : "611c0a463b1501
SELECT * FROM arrNestTest;
DROP TABLE arrNestTest;
--echo #
--echo # MDEV-30412 JSON_OBJECTAGG doesn't escape double quote in key
--echo #
SELECT JSON_OBJECTAGG('"', 1);
SELECT JSON_OBJECTAGG('\"', 1);
SELECT JSON_OBJECTAGG('\\', 1);
--echo #
--echo # End of 10.5 tests
--echo #
--echo #
--echo # MDEV-26054 Server crashes in Item_func_json_arrayagg::get_str_from_field
--echo #
@ -1078,7 +1090,6 @@ SELECT JSON_ARRAYAGG(a) AS f FROM v;
DROP VIEW v;
DROP TABLE t;
--echo #
--echo # MDEV-29264 JSON functions overflow error based ON LONGTEXT field
--echo #
@ -1090,8 +1101,9 @@ SELECT JSON_INSERT(JSON_OBJECT(l1, l2, l3, l4), '$.k3', 'v3'),JSON_SET(JSON_OBJE
DROP TABLE t;
--echo #
--echo # End of 10.5 tests
--echo # End of 10.6 tests
--echo #
--echo #
--echo # Beginning of 10.9 tests
--echo #
@ -1733,13 +1745,13 @@ SELECT JSON_EXTRACT(j, '$[*]') FROM t1 ;
DROP TABLE t1;
--echo #
--echo # End of 10.9 Test
--echo #
--echo #
--echo # MDEV-29381: JSON paths containing dashes are reported as syntax errors in procedures
--echo #
SELECT JSON_EXTRACT('{ "my-key": 1 }', '$."my-key"');
SELECT JSON_EXTRACT('{ "my-key": 1 }', '$.my-key');
--echo #
--echo # End of 10.9 Test
--echo #

View File

@ -1269,3 +1269,123 @@ EXPLAIN
}
}
DROP TABLES t1, t2;
# End of 10.3 tests
#
# MDEV-28538: multi-table UPDATE/DELETE with possible exists-to-in
#
create table t1 (c1 int, c2 int, c3 int, index idx(c2));
insert into t1 values
(1,1,1),(3,2,2),(1,3,3),
(2,1,4),(2,2,5),(4,3,6),
(2,4,7),(2,5,8);
create table t2 (c1 int, c2 int, c3 int, index idx(c2));
insert into t2 values
(1,7,1),(1,8,2),(1,3,3),
(2,1,4),(2,2,5),(2,3,6),
(2,4,7),(2,5,8);
create table t3 (c1 int, c2 int, c3 int, index idx(c2));
insert into t3 values
(1,1,1),(1,2,2),(1,3,3),
(2,1,4),(2,2,5),(2,3,6),
(2,4,7),(2,5,8);
insert into t3 select c1+1, c2+2, c3 from t3;
insert into t3 select c1, c2+2, c3 from t3;
analyze table t1,t2,t3 persistent for all;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select * from t1,t3
where t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL idx NULL NULL NULL 8 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY t3 ref idx idx 5 test.t1.c2 3
2 MATERIALIZED t2 range idx idx 5 NULL 3 Using index condition; Using where
explain delete from t1 using t1,t3
where t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL idx NULL NULL NULL 8 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY t3 ref idx idx 5 test.t1.c2 3 Using index
2 MATERIALIZED t2 range idx idx 5 NULL 3 Using where
explain update t1,t3 set t1.c1 = t1.c1+10
where t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL idx NULL NULL NULL 8 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
1 PRIMARY t3 ref idx idx 5 test.t1.c2 3 Using index
2 MATERIALIZED t2 range idx idx 5 NULL 3 Using where
create table t as select * from t1;
select * from t1,t3
where t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
c1 c2 c3 c1 c2 c3
2 1 4 1 1 1
2 1 4 2 1 4
2 2 5 1 2 2
2 2 5 2 2 5
2 4 7 2 4 7
2 4 7 2 4 2
2 4 7 3 4 5
2 4 7 1 4 2
2 4 7 2 4 5
2 5 8 2 5 8
2 5 8 2 5 3
2 5 8 3 5 6
2 5 8 1 5 3
2 5 8 2 5 6
2 5 8 2 5 1
2 5 8 3 5 4
select * from t1;
c1 c2 c3
1 1 1
3 2 2
1 3 3
2 1 4
2 2 5
4 3 6
2 4 7
2 5 8
delete from t1 using t1,t3
where t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
select * from t1;
c1 c2 c3
1 1 1
3 2 2
1 3 3
4 3 6
truncate table t1;
insert into t1 select * from t;
analyze table t1 persistent for all;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
update t1,t3 set t1.c1 = t1.c1+10
where t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
select * from t1;
c1 c2 c3
1 1 1
3 2 2
1 3 3
12 1 4
12 2 5
4 3 6
12 4 7
12 5 8
drop table t1,t2,t3,t;
# End of 10.4 tests

View File

@ -1130,3 +1130,73 @@ EXPLAIN FORMAT=JSON UPDATE t2 JOIN t1 USING(a) SET t2.part=2 WHERE t2.part=1 AND
EXPLAIN FORMAT=JSON UPDATE t2 JOIN t1 USING(a) SET t2.part=3 WHERE t2.part=2 AND t1.part=2;
DROP TABLES t1, t2;
--echo # End of 10.3 tests
--echo #
--echo # MDEV-28538: multi-table UPDATE/DELETE with possible exists-to-in
--echo #
create table t1 (c1 int, c2 int, c3 int, index idx(c2));
insert into t1 values
(1,1,1),(3,2,2),(1,3,3),
(2,1,4),(2,2,5),(4,3,6),
(2,4,7),(2,5,8);
create table t2 (c1 int, c2 int, c3 int, index idx(c2));
insert into t2 values
(1,7,1),(1,8,2),(1,3,3),
(2,1,4),(2,2,5),(2,3,6),
(2,4,7),(2,5,8);
create table t3 (c1 int, c2 int, c3 int, index idx(c2));
insert into t3 values
(1,1,1),(1,2,2),(1,3,3),
(2,1,4),(2,2,5),(2,3,6),
(2,4,7),(2,5,8);
insert into t3 select c1+1, c2+2, c3 from t3;
insert into t3 select c1, c2+2, c3 from t3;
analyze table t1,t2,t3 persistent for all;
let $c=
t1.c2 = t3.c2 and
t1.c1 > 1 and
exists (select 'X' from t2 where t2.c1 = t1.c1 and t2.c2 > 4);
let $q1=
select * from t1,t3
where $c;
eval explain $q1;
let $q2=
delete from t1 using t1,t3
where $c;
eval explain $q2;
let $q3=
update t1,t3 set t1.c1 = t1.c1+10
where $c;
eval explain $q3;
create table t as select * from t1;
eval $q1;
select * from t1;
eval $q2;
select * from t1;
truncate table t1;
insert into t1 select * from t;
analyze table t1 persistent for all;
eval $q3;
select * from t1;
drop table t1,t2,t3,t;
--echo # End of 10.4 tests

View File

@ -76,7 +76,8 @@ rollback;
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where
2 DEPENDENT SUBQUERY a ALL NULL NULL NULL NULL 8 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED a ALL NULL NULL NULL NULL 8
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
affected rows: 4
@ -317,7 +318,8 @@ rollback;
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where
2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 4 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED a range t1_c2 t1_c2 5 NULL 2 Using where; Using index
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
affected rows: 4
@ -558,7 +560,8 @@ rollback;
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where
2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 1 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED a range t1_c2 t1_c2 5 NULL 2 Using where; Using index
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
affected rows: 4
@ -800,7 +803,8 @@ rollback;
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where
2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 1 Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED a range t1_c2 t1_c2 5 NULL 2 Using where; Using index
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
affected rows: 4

View File

@ -145,6 +145,7 @@ my $opt_start_exit;
my $start_only;
my $file_wsrep_provider;
my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.
my $test_name_for_report;
our @global_suppressions;
@ -515,13 +516,13 @@ sub main {
}
if ( not @$completed ) {
my $test_name= mtr_grab_file($path_testlog);
$test_name =~ s/^CURRENT_TEST:\s//;
chomp($test_name);
my $tinfo = My::Test->new(name => $test_name);
$tinfo->{result}= 'MTR_RES_FAILED';
$tinfo->{comment}=' ';
mtr_report_test($tinfo);
if ($test_name_for_report)
{
my $tinfo = My::Test->new(name => $test_name_for_report);
$tinfo->{result}= 'MTR_RES_FAILED';
$tinfo->{comment}=' ';
mtr_report_test($tinfo);
}
mtr_error("Test suite aborted");
}
@ -3740,8 +3741,8 @@ sub resfile_report_test ($) {
sub run_testcase ($$) {
my ($tinfo, $server_socket)= @_;
my $print_freq=20;
mtr_verbose("Running test:", $tinfo->{name});
$test_name_for_report= $tinfo->{name};
mtr_verbose("Running test:", $test_name_for_report);
$ENV{'MTR_TEST_NAME'} = $tinfo->{name};
resfile_report_test($tinfo) if $opt_resfile;
@ -5130,12 +5131,10 @@ sub mysqld_start ($$) {
if (!$rc)
{
# Report failure about the last test case before exit
my $test_name= mtr_grab_file($path_current_testlog);
$test_name =~ s/^CURRENT_TEST:\s//;
my $tinfo = My::Test->new(name => $test_name);
my $tinfo = My::Test->new(name => $test_name_for_report);
$tinfo->{result}= 'MTR_RES_FAILED';
$tinfo->{failures}= 1;
$tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $tinfo->{name});
$tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $test_name_for_report);
report_option('verbose', 1);
mtr_report_test($tinfo);
}

View File

@ -1,23 +0,0 @@
connection node_2;
connection node_1;
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
SELECT get_lock ('test2', 0);
get_lock ('test2', 0)
1
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_trx_fragment_size=10;
SET SESSION autocommit=0;
SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
c1
INSERT INTO t1 VALUES (4),(3),(1),(2);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
ERROR 42S01: Table 't1' already exists
ALTER TABLE t1 DROP COLUMN c2;
ERROR 42000: Can't DROP COLUMN `c2`; check that it exists
SELECT get_lock ('test', 1.5);
get_lock ('test', 1.5)
1
DROP TABLE t1;

View File

@ -0,0 +1,6 @@
connection node_2;
connection node_1;
BACKUP STAGE START;
START TRANSACTION;
COMMIT;
BACKUP STAGE END;

View File

@ -1,18 +0,0 @@
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2a;
SELECT GET_LOCK("foo", 1000);
GET_LOCK("foo", 1000)
1
connection node_2;
SET AUTOCOMMIT=OFF;
INSERT INTO t1 VALUES (1);
SELECT GET_LOCK("foo", 1000);;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;

View File

@ -0,0 +1,24 @@
connection node_2;
connection node_1;
CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB;
INSERT INTO t values (1,1);
SELECT GET_LOCK('a',1);
ERROR 42000: This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'
SELECT * FROM t;
c c2
1 1
SELECT RELEASE_LOCK('a');
ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
SELECT RELEASE_ALL_LOCKS();
ERROR 42000: This version of MariaDB doesn't yet support 'RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)'
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MariaDB doesn't yet support 'RELEASE_ALL_LOCKS in cluster (WSREP_ON=ON)'
COMMIT;
DROP TABLE t;

View File

@ -1,20 +0,0 @@
--source include/galera_cluster.inc
--source include/have_sequence.inc
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
SELECT get_lock ('test2', 0);
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_trx_fragment_size=10;
SET SESSION autocommit=0;
SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
--error ER_LOCK_DEADLOCK
INSERT INTO t1 VALUES (4),(3),(1),(2);
--error ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
--error ER_CANT_DROP_FIELD_OR_KEY
ALTER TABLE t1 DROP COLUMN c2;
SELECT get_lock ('test', 1.5);
DROP TABLE t1;

View File

@ -0,0 +1,6 @@
--source include/galera_cluster.inc
BACKUP STAGE START;
START TRANSACTION;
COMMIT;
BACKUP STAGE END;

View File

@ -1,36 +0,0 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
#
# Test a local transaction being aborted by a slave one while it is running a GET_LOCK()
#
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--let $galera_connection_name = node_2a
--let $galera_server_number = 2
--source include/galera_connect.inc
--connection node_2a
SELECT GET_LOCK("foo", 1000);
--connection node_2
SET AUTOCOMMIT=OFF;
--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
INSERT INTO t1 VALUES (1);
--send SELECT GET_LOCK("foo", 1000);
--connection node_1
INSERT INTO t1 VALUES (1);
--connection node_2
--error ER_LOCK_DEADLOCK
--reap
--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
# Check that wsrep_local_bf_aborts has been incremented by exactly 1
--disable_query_log
--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment;
--enable_query_log
DROP TABLE t1;

View File

@ -0,0 +1,18 @@
--source include/galera_cluster.inc
CREATE TABLE t (c DOUBLE,c2 INT,PRIMARY KEY(c)) ENGINE=InnoDB;
INSERT INTO t values (1,1);
--error ER_NOT_SUPPORTED_YET
SELECT GET_LOCK('a',1);
SHOW WARNINGS;
SELECT * FROM t;
--error ER_NOT_SUPPORTED_YET
SELECT RELEASE_LOCK('a');
SHOW WARNINGS;
# New in 10.5
--error ER_NOT_SUPPORTED_YET
SELECT RELEASE_ALL_LOCKS();
SHOW WARNINGS;
COMMIT;
DROP TABLE t;

View File

@ -51,7 +51,7 @@ ADD INDEX(a,b,d), ADD INDEX(a,d,b), ADD INDEX(b,c,d), ADD INDEX(b,d,c),
ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
# restart: --innodb-force-recovery=3
# restart: --innodb-force-recovery=3 --debug_dbug=+d,recv_ran_out_of_buffer
disconnect hang;
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd

View File

@ -405,3 +405,21 @@ nb_corrupted_rows
0
DROP TABLE t1;
# End of 10.7 tests
#
# MDEV-30426 Assertion !rec_offs_nth_extern(offsets2, n)
# during bulk insert
#
CREATE TABLE t1(f1 TEXT NOT NULL, f2 TEXT NOT NULL,
f3 TEXT NOT NULL, f4 TEXT NOT NULL,
f5 TEXT NOT NULL, f6 TEXT NOT NULL,
PRIMARY KEY(f6(10)))ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES
(repeat('a', 200), repeat('b', 200), repeat('c', 200),
repeat('d', 200), repeat('e', 200), repeat('f', 200)),
(repeat('b', 20000), repeat('c', 16000), repeat('d', 12000),
repeat('e', 12000), repeat('f', 12000), repeat('f', 12000));
ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
COMMIT;
DROP TABLE t1;
# End of 10.8 tests

View File

@ -31,11 +31,12 @@ pk f1 f2 f3
3 t q 1
5 z t NULL
SET DEBUG_SYNC='now SIGNAL default_dml';
SET DEBUG_SYNC='now SIGNAL con2_dml';
connection default;
SET DEBUG_SYNC='now WAIT_FOR default_dml';
UPDATE t3 AS alias1 LEFT JOIN t3 AS alias2 ON ( alias1.f1 <> alias1.f2 ) SET alias1.f3 = 59 WHERE ( EXISTS ( SELECT t1.f3 FROM t1 WHERE t1.f1 = alias1.f1 ) ) OR alias2.f1 = 'h';
connect con2,localhost,root,,test;
set debug_sync='now WAIT_FOR default_dml';
set debug_sync='now WAIT_FOR con2_dml';
SET DEBUG_SYNC='now SIGNAL con1_dml2';
disconnect con2;
connection con1;

View File

@ -1,3 +1,7 @@
call mtr.add_suppression("InnoDB: The change buffer is corrupted");
call mtr.add_suppression("InnoDB: Plugin initialization aborted at srv0start.cc");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
CREATE TABLE t1(c TEXT, KEY(c(3072)))ENGINE=InnoDB;
CREATE PROCEDURE dorepeat()
LOOP
@ -10,3 +14,19 @@ CALL dorepeat();
connection default;
# restart: --innodb_buffer_pool_size=5242880
DROP TABLE t1;
DROP PROCEDURE dorepeat;
#
# MDEV-30552 InnoDB recovery crashes when error
# handling scenario
#
SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
INSERT INTO t1 SELECT * FROM seq_1_to_65536;
# restart: with restart_parameters
# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;

View File

@ -57,7 +57,7 @@ ALTER TABLE t ADD INDEX(b,c,d,a),ADD INDEX(b,c,a,d),ADD INDEX(b,a,c,d),ADD INDEX
connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
let $shutdown_timeout=0;
--let $restart_parameters= --innodb-force-recovery=3
--let $restart_parameters= --innodb-force-recovery=3 --debug_dbug="+d,recv_ran_out_of_buffer"
--source include/restart_mysqld.inc
disconnect hang;
let $shutdown_timeout=;

View File

@ -0,0 +1 @@
--innodb_sort_buffer_size=65536

View File

@ -424,3 +424,22 @@ SELECT COUNT(*) AS nb_corrupted_rows FROM t1 WHERE data != REPEAT('X', @@innodb_
DROP TABLE t1;
--echo # End of 10.7 tests
--echo #
--echo # MDEV-30426 Assertion !rec_offs_nth_extern(offsets2, n)
--echo # during bulk insert
--echo #
CREATE TABLE t1(f1 TEXT NOT NULL, f2 TEXT NOT NULL,
f3 TEXT NOT NULL, f4 TEXT NOT NULL,
f5 TEXT NOT NULL, f6 TEXT NOT NULL,
PRIMARY KEY(f6(10)))ENGINE=InnoDB;
BEGIN;
--error ER_ERROR_DURING_COMMIT
INSERT INTO t1 VALUES
(repeat('a', 200), repeat('b', 200), repeat('c', 200),
repeat('d', 200), repeat('e', 200), repeat('f', 200)),
(repeat('b', 20000), repeat('c', 16000), repeat('d', 12000),
repeat('e', 12000), repeat('f', 12000), repeat('f', 12000));
COMMIT;
DROP TABLE t1;
--echo # End of 10.8 tests

View File

@ -35,6 +35,7 @@ SET DEBUG_SYNC='now WAIT_FOR con1_dml';
begin;
SELECT * FROM t1 for update; # Holds x lock of all records in the table t1
SET DEBUG_SYNC='now SIGNAL default_dml';
SET DEBUG_SYNC='now SIGNAL con2_dml';
--connection default
SET DEBUG_SYNC='now WAIT_FOR default_dml';
@ -42,7 +43,7 @@ SET DEBUG_SYNC='now WAIT_FOR default_dml';
# It holds the lock of all record in t3 and tries to acquire record lock for the table t1.
--connect (con2,localhost,root,,test)
set debug_sync='now WAIT_FOR default_dml';
set debug_sync='now WAIT_FOR con2_dml';
let $wait_condition=
select count(*) > 0 from information_schema.innodb_lock_waits;
--source include/wait_condition.inc

View File

@ -1,5 +1,11 @@
--source include/have_innodb.inc
--source include/big_test.inc
--source include/have_sequence.inc
--source include/maybe_debug.inc
call mtr.add_suppression("InnoDB: The change buffer is corrupted");
call mtr.add_suppression("InnoDB: Plugin initialization aborted at srv0start.cc");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
CREATE TABLE t1(c TEXT, KEY(c(3072)))ENGINE=InnoDB;
DELIMITER |;
@ -19,3 +25,27 @@ let $shutdown_timeout=0;
let $restart_parameters=--innodb_buffer_pool_size=5242880;
--source include/restart_mysqld.inc
DROP TABLE t1;
DROP PROCEDURE dorepeat;
--echo #
--echo # MDEV-30552 InnoDB recovery crashes when error
--echo # handling scenario
--echo #
if ($have_debug) {
SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
let $restart_parameters=--innodb_buffer_pool_size=5242880 --debug_dbug="+d,ibuf_init_corrupt";
}
if (!$have_debug) {
--echo SET DEBUG_DBUG="+d,ib_log_checkpoint_avoid_hard";
let $restart_parameters=--innodb_buffer_pool_size=5242880;
}
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
INSERT INTO t1 SELECT * FROM seq_1_to_65536;
let $restart_noprint=1;
let $shutdown_timeout=0;
--source include/restart_mysqld.inc
let $restart_noprint=0;
let $restart_parameters=;
--source include/restart_mysqld.inc
SHOW CREATE TABLE t1;
DROP TABLE t1;

View File

@ -0,0 +1,12 @@
#
# MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered'
#
# xtrabackup backup
# xtrabackup prepare
# shutdown server
# remove datadir
# xtrabackup move back
# restart
#
# End of 10.4 tests
#

View File

@ -0,0 +1,24 @@
--source include/windows.inc
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--echo #
--echo # MDEV-30492 Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered'
--echo #
echo # xtrabackup backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --innodb_flush_method=normal --backup --target-dir=$targetdir;
--enable_result_log
echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --innodb-flush-method=async_unbuffered --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
rmdir $targetdir;
--echo #
--echo # End of 10.4 tests
--echo #

View File

@ -47,12 +47,8 @@ connection master2;
INSERT INTO t2 VALUES (2, "switch1");
INSERT INTO t3 VALUES (202, "switch1 b");
connection slave2;
CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_user='root';
CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root';
SET default_master_connection = 'slave1';
START SLAVE;
include/wait_for_slave_to_start.inc
@ -79,9 +75,7 @@ INSERT INTO t3 VALUES (204, "switch 3 b");
connection slave2;
include/sync_with_master_gtid.inc
connection slave1;
CHANGE MASTER TO master_port=MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO master_port=MYPORT_4, master_host='127.0.0.1', master_user='root';
START SLAVE;
SELECT * FROM t1 ORDER BY a;
a b

View File

@ -73,9 +73,9 @@ INSERT INTO t3 VALUES (202, "switch1 b");
--connection slave2
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root';
--replace_result $SERVER_MYPORT_2 MYPORT_2
eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root';
SET default_master_connection = 'slave1';
START SLAVE;
--source include/wait_for_slave_to_start.inc
@ -125,7 +125,7 @@ INSERT INTO t3 VALUES (204, "switch 3 b");
--connection slave1
--replace_result $SERVER_MYPORT_4 MYPORT_4
eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root';
START SLAVE;
--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=3 AND (SELECT COUNT(*) FROM t2)=4 AND (SELECT COUNT(*) FROM t3)=7
--source include/wait_condition.inc

View File

@ -4,9 +4,7 @@ connection master;
SET GLOBAL LOG_WARNINGS=2;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
include/start_slave.inc
connection master;
"Test Case 1: Start binlog_dump to slave_server(#), pos(master-bin.000001, ###), using_gtid(1), gtid('')"

View File

@ -35,9 +35,19 @@ connection master;
insert into t1 values (1);
# Sleep 3 to create gap between events
insert into t1 values (2);
include/save_master_pos.inc
connection slave;
LOCK TABLES t1 WRITE;
SET @@global.debug_dbug="+d,pause_sql_thread_on_next_event";
START SLAVE IO_THREAD;
# Before we start processing the events, we ensure both transactions
# were written into the relay log. Otherwise, if the IO thread takes too
# long to queue the events, the sql thread can think it has caught up
# too quickly.
SET DEBUG_SYNC='now WAIT_FOR paused_on_event';
include/sync_io_with_master.inc
SET @@global.debug_dbug="-d,pause_sql_thread_on_next_event";
SET DEBUG_SYNC='now SIGNAL sql_thread_continue';
# Wait for first transaction to complete SQL delay and begin execution..
# Validate SBM calculation doesn't use the second transaction because SQL thread shouldn't have gone idle..
# ..and that SBM wasn't calculated using prior committed transactions
@ -50,6 +60,8 @@ UNLOCK TABLES;
include/stop_slave.inc
CHANGE MASTER TO master_delay=0;
set @@GLOBAL.slave_parallel_threads=4;
SET @@global.debug_dbug="";
SET DEBUG_SYNC='RESET';
include/start_slave.inc
connection master;
DROP TABLE t1;

View File

@ -14,9 +14,7 @@ call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed regis
SET sql_log_bin=1;
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
connection server_1;
INSERT INTO t1 VALUES (2,1);
INSERT INTO t1 VALUES (3,1);

View File

@ -3,9 +3,7 @@ include/master-slave.inc
CREATE TABLE t1 (i INT);
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID= current_pos, MASTER_DELAY= 10;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO MASTER_DELAY= 10;
include/start_slave.inc
connection master;
INSERT INTO t1 VALUES (1);
@ -16,7 +14,7 @@ connection slave;
# Asserted this: One row shoule be found in table t1.
"======= Clean up ========"
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID=no, MASTER_DELAY=0;
CHANGE MASTER TO MASTER_DELAY=0;
START SLAVE;
connection master;
DROP TABLE t1;

View File

@ -12,24 +12,12 @@ RETURN s;
END|
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection server_3;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection server_4;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection server_5;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection server_1;
SET gtid_domain_id= 1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
@ -347,9 +335,7 @@ a b
*** Now let the old master join up as slave. ***
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user = "root", master_use_gtid = current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
master_user = "root", master_use_gtid = slave_pos, master_demote_to_slave=1;
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a
@ -387,8 +373,6 @@ a b
connection server_1;
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1;
include/start_slave.inc

View File

@ -12,9 +12,7 @@ include/wait_for_slave_to_stop.inc
reset slave all;
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user='root', MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
master_user='root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
include/start_slave.inc
include/wait_for_slave_to_start.inc
connection server_2;
@ -24,9 +22,7 @@ insert into t1 values (4);
flush logs;
connection server_3;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
select * from t1 order by n;
n
@ -57,20 +53,14 @@ connection server_1;
include/stop_slave.inc
include/wait_for_slave_to_stop.inc
reset slave all;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
master_user = 'root', MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
master_user = 'root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
include/start_slave.inc
connection server_3;
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
connection server_1;
drop table t1;

View File

@ -9,9 +9,6 @@ include/stop_slave.inc
SET sql_log_bin= 0;
INSERT INTO t1 VALUES (1);
SET sql_log_bin= 1;
CHANGE MASTER TO master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection master;
CREATE TEMPORARY TABLE t2 LIKE t1;
INSERT INTO t2 VALUE (1);

View File

@ -21,9 +21,7 @@ a b
include/stop_slave.inc
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SLAVE_PORT,
master_user = 'root', master_use_gtid = current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
master_user = 'root';
START SLAVE;
include/wait_for_slave_to_start.inc
connection server_2;
@ -48,16 +46,11 @@ a b
4 2
include/stop_slave.inc
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
INSERT INTO t1 VALUES (5, 1);
INSERT INTO t1 VALUES (6, 1);
include/save_master_gtid.inc
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
master_use_gtid = current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT;
START SLAVE;
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;

View File

@ -1,10 +1,4 @@
include/rpl_init.inc [topology=1->2]
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a INT);
FLUSH LOGS;

View File

@ -58,9 +58,7 @@ SHOW VARIABLES LIKE 'gtid_binlog_state';
Variable_name Value
gtid_binlog_state
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
SHOW VARIABLES LIKE 'gtid_binlog_pos';
Variable_name Value

View File

@ -11,9 +11,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
connection server_2;
SET GLOBAL gtid_slave_pos="";
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
SELECT * FROM t1;
a
@ -35,9 +33,7 @@ master-bin.000003 #
connection server_2;
SET GLOBAL gtid_slave_pos="";
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
START SLAVE;
include/wait_for_slave_io_error.inc [errno=1236]
include/stop_slave.inc
@ -59,9 +55,7 @@ include/save_master_gtid.inc
connection server_2;
SET GLOBAL gtid_slave_pos='0-1-3';
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER by a;
@ -96,16 +90,12 @@ connection server_2;
connection server_2;
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
RESET MASTER;
connection server_1;
RESET MASTER;
connection server_2;
SET GLOBAL gtid_slave_pos='';
CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root', master_use_gtid=slave_pos;
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY);
@ -129,8 +119,6 @@ connection server_2;
include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
SET GLOBAL gtid_slave_pos="";
Warnings:
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-4. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
@ -162,9 +150,7 @@ Using_Gtid = 'No'
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1050]
STOP SLAVE IO_THREAD;
CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
include/start_slave.inc
connection server_1;
INSERT INTO t1 VALUES(3);
@ -223,9 +209,9 @@ include/sync_with_master_gtid.inc
SELECT * FROM t1;
a
10
SELECT 'Current_Pos' AS Using_Gtid;
SELECT 'Slave_Pos' AS Using_Gtid;
Using_Gtid
Current_Pos
Slave_Pos
SELECT '0-1-2' AS Gtid_Slave_Pos;
Gtid_Slave_Pos
0-1-2
@ -252,8 +238,6 @@ connection server_2;
include/stop_slave.inc
DROP TABLE t1;
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
CHANGE MASTER TO MASTER_USE_GTID=NO;
RESET MASTER;
SET GLOBAL gtid_slave_pos= "";

View File

@ -7,9 +7,6 @@ connection server_2;
include/stop_slave.inc
Master_Log_File = 'master-bin.000001'
Using_Gtid = 'Slave_Pos'
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
FLUSH LOGS;
connection server_1;
FLUSH LOGS;

View File

@ -29,9 +29,7 @@ ERROR HY000: Slave is already running
include/stop_slave_io.inc
START SLAVE UNTIL master_gtid_pos = "";
ERROR HY000: START SLAVE UNTIL master_gtid_pos requires that slave is using GTID
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
CHANGE MASTER TO master_use_gtid=slave_pos;
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@ -60,7 +58,7 @@ a
include/stop_slave.inc
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
include/wait_for_slave_to_start.inc
Using_Gtid = 'Current_Pos'
Using_Gtid = 'Slave_Pos'
Until_Condition = 'Gtid'
connection server_1;
INSERT INTO t1 VALUES (3);
@ -205,8 +203,6 @@ include/start_slave.inc
connection server_2;
include/stop_slave.inc
RESET SLAVE ALL;
Warnings:
Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'Current_Pos' to 'Slave_Pos'
RESET MASTER;
SET GLOBAL gtid_slave_pos='';
connection server_1;
@ -219,9 +215,7 @@ RESET MASTER;
INSERT INTO t1 VALUES (10);
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
master_user = "root", master_use_gtid = current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
master_user = "root", master_use_gtid = slave_pos;
START SLAVE UNTIL master_gtid_pos = '0-1-2';
include/wait_for_slave_to_start.inc
connection server_1;

View File

@ -10,9 +10,6 @@ SET sql_log_bin= 0;
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
INSERT INTO t1 VALUES (1, 2);
SET sql_log_bin= 1;
CHANGE MASTER TO master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
Contents on slave before:
SELECT * FROM t1 ORDER BY a;
a b

View File

@ -4,9 +4,6 @@ connection server_2;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
*** MDEV-6589: Incorrect relay log start position when restarting SQL thread after error in parallel replication ***
connection server_1;

View File

@ -17,16 +17,10 @@ SET GLOBAL binlog_commit_wait_usec=2000000;
SET @old_updates= @@GLOBAL.binlog_direct_non_transactional_updates;
SET GLOBAL binlog_direct_non_transactional_updates=OFF;
SET SESSION binlog_direct_non_transactional_updates=OFF;
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection server_3;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
connection server_1;
BEGIN;
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=MEMORY;

View File

@ -4,9 +4,6 @@ connection server_2;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=5;
CHANGE MASTER TO master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(100) CHARACTER SET utf8);

View File

@ -4,9 +4,6 @@ connection master;
set global binlog_alter_two_phase=true;
connection slave;
include/stop_slave.inc
change master to master_use_gtid= current_pos;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
set global gtid_strict_mode=1;
# Legacy Master Slave
connect master_node,127.0.0.1,root,,$db_name, $M_port;

View File

@ -3,9 +3,6 @@ include/master-slave.inc
*** MDEV-9383: Server fails to read master.info after upgrade 10.0 -> 10.1 ***
connection slave;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=CURRENT_POS;
Warnings:
Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/rpl_stop_server.inc [server_number=2]
include/rpl_start_server.inc [server_number=2]
connection master;

View File

@ -8,7 +8,7 @@
# Steps:
# 0 - Have LOG_WARNINGS=2
# 1 - On a fresh slave server which has not replicated any GTIDs execute
# "CHANGE MASTER TO MASTER_USE_GTID=current_pos;" command. Start the
# "CHANGE MASTER TO MASTER_USE_GTID=slave_pos;" command. Start the
# slave.
# 2 - In Master error log verify that pattern "using_gtid(1), gtid('')" is
# present.
@ -43,7 +43,7 @@ SET GLOBAL LOG_WARNINGS=2;
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=current_pos;
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
--connection master

View File

@ -12,9 +12,12 @@
#
--source include/master-slave.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--connection slave
--source include/stop_slave.inc
--let $old_debug_dbug= `SELECT @@global.debug_dbug`
--let $master_delay= 3
--eval change master to master_delay=$master_delay, master_use_gtid=Slave_Pos
--let $old_slave_threads= `SELECT @@GLOBAL.slave_parallel_threads`
@ -82,12 +85,24 @@ sleep 3;
--eval insert into t1 values ($insert_ctr)
--inc $insert_ctr
--let $ts_trx_after_ins= `SELECT UNIX_TIMESTAMP()`
--source include/save_master_pos.inc
--connection slave
LOCK TABLES t1 WRITE;
SET @@global.debug_dbug="+d,pause_sql_thread_on_next_event";
START SLAVE IO_THREAD;
--echo # Before we start processing the events, we ensure both transactions
--echo # were written into the relay log. Otherwise, if the IO thread takes too
--echo # long to queue the events, the sql thread can think it has caught up
--echo # too quickly.
SET DEBUG_SYNC='now WAIT_FOR paused_on_event';
--source include/sync_io_with_master.inc
SET @@global.debug_dbug="-d,pause_sql_thread_on_next_event";
SET DEBUG_SYNC='now SIGNAL sql_thread_continue';
--echo # Wait for first transaction to complete SQL delay and begin execution..
--let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting for table metadata lock%' AND command LIKE 'Slave_Worker';
--source include/wait_condition.inc
@ -120,6 +135,8 @@ UNLOCK TABLES;
--source include/stop_slave.inc
--eval CHANGE MASTER TO master_delay=0
--eval set @@GLOBAL.slave_parallel_threads=$old_slave_threads
--eval SET @@global.debug_dbug="$old_debug_dbug"
SET DEBUG_SYNC='RESET';
--source include/start_slave.inc
--connection master

View File

@ -27,7 +27,7 @@ SET sql_log_bin=1;
--source include/stop_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
--connection server_1
INSERT INTO t1 VALUES (2,1);

View File

@ -7,7 +7,7 @@
#
# Steps:
# 0 - Stop the slave and execute CHANGE MASTER command with
# master_use_gtid= curren_pos and master_delay= 10
# master_delay= 10
# 1 - On slave introduce a sleep of 15 seconds and check that the
# Seconds_Behind_Master is within specified master_delay limit. It should
# not be more that "10" seconds.
@ -23,7 +23,7 @@ CREATE TABLE t1 (i INT);
--sync_slave_with_master
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID= current_pos, MASTER_DELAY= 10;
CHANGE MASTER TO MASTER_DELAY= 10;
--source include/start_slave.inc
--connection master
@ -47,7 +47,7 @@ INSERT INTO t1 VALUES (1);
--echo "======= Clean up ========"
STOP SLAVE;
CHANGE MASTER TO MASTER_USE_GTID=no, MASTER_DELAY=0;
CHANGE MASTER TO MASTER_DELAY=0;
START SLAVE;
--connection master

View File

@ -31,22 +31,18 @@ delimiter ;|
--connection server_2
--sync_with_master
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
--connection server_3
--sync_with_master
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
--connection server_4
--sync_with_master
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
--connection server_5
--sync_with_master
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=current_pos;
# Create three separate replication streams on master server_1.
@ -225,7 +221,7 @@ SELECT * FROM t4 ORDER BY a,b;
--connection server_1
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
master_user = "root", master_use_gtid = current_pos;
master_user = "root", master_use_gtid = slave_pos, master_demote_to_slave=1;
--source include/start_slave.inc
--sync_with_master
SELECT * FROM t1 ORDER BY a;

View File

@ -24,7 +24,7 @@ reset slave all;
connection server_1;
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
master_user='root', MASTER_USE_GTID=CURRENT_POS;
master_user='root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
source include/start_slave.inc;
source include/wait_for_slave_to_start.inc;
@ -38,7 +38,7 @@ save_master_pos;
connection server_3;
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
source include/start_slave.inc;
sync_with_master;
@ -56,14 +56,14 @@ reset slave all;
connection server_2;
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_1,
master_user = 'root', MASTER_USE_GTID=CURRENT_POS;
master_user = 'root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
source include/start_slave.inc;
connection server_3;
source include/stop_slave.inc;
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_1,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
source include/start_slave.inc;
connection server_1;

View File

@ -13,7 +13,6 @@ CREATE TABLE t1 (a INT PRIMARY KEY);
SET sql_log_bin= 0;
INSERT INTO t1 VALUES (1);
SET sql_log_bin= 1;
CHANGE MASTER TO master_use_gtid= current_pos;
--connection master

View File

@ -25,7 +25,7 @@ SELECT * FROM t1 ORDER BY a;
--connection server_1
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT,
master_user = 'root', master_use_gtid = current_pos;
master_user = 'root';
START SLAVE;
--source include/wait_for_slave_to_start.inc
@ -49,8 +49,7 @@ INSERT INTO t1 VALUES (6, 1);
--connection server_2
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
master_use_gtid = current_pos;
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT;
START SLAVE;
--source include/sync_with_master_gtid.inc

View File

@ -4,11 +4,6 @@
--source include/have_debug.inc
--connection server_2
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid= current_pos;
--source include/start_slave.inc
--connection server_1
CREATE TABLE t1 (a INT);
FLUSH LOGS;

View File

@ -47,7 +47,7 @@ SHOW VARIABLES LIKE 'gtid_slave_pos';
SHOW VARIABLES LIKE 'gtid_binlog_state';
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
--source include/start_slave.inc
--sync_with_master
SHOW VARIABLES LIKE 'gtid_binlog_pos';

View File

@ -19,7 +19,7 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL gtid_slave_pos="";
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
--source include/start_slave.inc
--sync_with_master
SELECT * FROM t1;
@ -46,7 +46,7 @@ INSERT INTO t1 VALUES (2);
SET GLOBAL gtid_slave_pos="";
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
START SLAVE;
--let $slave_io_errno= 1236
--source include/wait_for_slave_io_error.inc
@ -73,7 +73,7 @@ INSERT INTO t1 VALUES(3);
SET GLOBAL gtid_slave_pos='0-1-3';
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=CURRENT_POS;
MASTER_USE_GTID=SLAVE_POS;
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER by a;
@ -118,7 +118,7 @@ RESET MASTER;
--connection server_2
SET GLOBAL gtid_slave_pos='';
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root', master_use_gtid=current_pos;
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root', master_use_gtid=slave_pos;
--source include/start_slave.inc
--connection server_1
@ -199,7 +199,7 @@ START SLAVE;
# Going back to using GTID should fix things.
STOP SLAVE IO_THREAD;
CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
--source include/start_slave.inc
--connection server_1

View File

@ -21,7 +21,6 @@ INSERT INTO t1 VALUES (1);
--let $status_items= Master_Log_File,Using_Gtid
--source include/show_slave_status.inc
CHANGE MASTER TO master_use_gtid=current_pos;
# Now try to restart the slave mysqld server without starting the slave first
# threads after the CHANGE MASTER.

View File

@ -45,7 +45,7 @@ START SLAVE UNTIL master_gtid_pos = "";
--error ER_UNTIL_REQUIRES_USING_GTID
START SLAVE UNTIL master_gtid_pos = "";
CHANGE MASTER TO master_use_gtid=current_pos;
CHANGE MASTER TO master_use_gtid=slave_pos;
--connection server_1
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
@ -224,7 +224,7 @@ INSERT INTO t1 VALUES (10);
--connection server_2
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_1,
master_user = "root", master_use_gtid = current_pos;
master_user = "root", master_use_gtid = slave_pos;
eval START SLAVE UNTIL master_gtid_pos = '$until_condition';
--source include/wait_for_slave_to_start.inc

View File

@ -13,7 +13,6 @@ SET sql_log_bin= 0;
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
INSERT INTO t1 VALUES (1, 2);
SET sql_log_bin= 1;
CHANGE MASTER TO master_use_gtid= current_pos;
--echo Contents on slave before:
SELECT * FROM t1 ORDER BY a;

View File

@ -7,7 +7,6 @@
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
--source include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=current_pos;
--source include/start_slave.inc

View File

@ -25,7 +25,6 @@ SET GLOBAL binlog_commit_wait_usec=2000000;
SET @old_updates= @@GLOBAL.binlog_direct_non_transactional_updates;
SET GLOBAL binlog_direct_non_transactional_updates=OFF;
SET SESSION binlog_direct_non_transactional_updates=OFF;
CHANGE MASTER TO master_use_gtid=current_pos;
--connection server_3
--sync_with_master
@ -33,7 +32,6 @@ CHANGE MASTER TO master_use_gtid=current_pos;
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
--source include/stop_slave.inc
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=current_pos;
--connection server_1

View File

@ -12,7 +12,6 @@
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
--source include/stop_slave.inc
SET GLOBAL slave_parallel_threads=5;
CHANGE MASTER TO master_use_gtid= current_pos;
--source include/start_slave.inc
--connection server_1

View File

@ -1,6 +1,6 @@
#
# Start Alter with binlog applied using mysqlbinlog
# single maser with only one domain id
# single master with only one domain id
#
--source include/have_innodb.inc
--source include/have_debug.inc
@ -10,7 +10,6 @@
set global binlog_alter_two_phase=true;
--connection slave
--source include/stop_slave.inc
change master to master_use_gtid= current_pos;
set global gtid_strict_mode=1;
--echo # Legacy Master Slave

View File

@ -4,7 +4,6 @@
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=CURRENT_POS;
--let $datadir= `SELECT @@datadir`
--let $rpl_server_number= 2

View File

@ -19,11 +19,12 @@ a b c
1 NULL NULL
set debug_sync='now SIGNAL go';
set debug_sync='now WAIT_FOR parked2';
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go2';
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3';
drop table t1;;
connection con2;
set debug_sync='now WAIT_FOR waiting';
set debug_sync='now SIGNAL go2';
set debug_sync='now SIGNAL go3';
connection default;
connection con1;
connection default;

View File

@ -20,15 +20,12 @@ set debug_sync='now WAIT_FOR parked';
select * from t1;
set debug_sync='now SIGNAL go';
set debug_sync='now WAIT_FOR parked2';
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go2';
set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3';
--send drop table t1;
--connection con2
set debug_sync='now WAIT_FOR waiting';
set debug_sync='now SIGNAL go2';
# Write out show processlist if the debug sync point times out
let $wait_condition= select count(*)=0 from information_schema.processlist where state like "%debug%";
source include/wait_condition.inc;
set debug_sync='now SIGNAL go3';
--connection default
--reap

View File

@ -2,17 +2,17 @@ select @@global.debug_sync;
ERROR HY000: Variable 'debug_sync' is a SESSION variable
select @@session.debug_sync;
@@session.debug_sync
ON - current signal: ''
ON - current signals: ''
show global variables like "debug_sync";
Variable_name Value
show session variables like "debug_sync";
Variable_name Value
debug_sync ON - current signal: ''
debug_sync ON - current signals: ''
select * from information_schema.global_variables where variable_name="debug_sync";
VARIABLE_NAME VARIABLE_VALUE
select * from information_schema.session_variables where variable_name="debug_sync";
VARIABLE_NAME VARIABLE_VALUE
DEBUG_SYNC ON - current signal: ''
DEBUG_SYNC ON - current signals: ''
set @@session.debug_sync=1;
ERROR 42000: Incorrect argument type to variable 'debug_sync'
set @@session.debug_sync=1.1;

View File

@ -77,7 +77,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
GLOBAL_VALUE_PATH NULL
VARIABLE_NAME DEBUG_SYNC
SESSION_VALUE ON - current signal: ''
SESSION_VALUE ON - current signals: ''
GLOBAL_VALUE NULL
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE

View File

@ -393,6 +393,8 @@ static int add_collation(struct charset_info_st *cs)
&my_charset_utf8mb4_unicode_ci,
cs);
newcs->m_ctype= my_charset_utf8mb4_unicode_ci.m_ctype;
if (init_state_maps(newcs))
return MY_XML_ERROR;
newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED;
#endif
}

View File

@ -376,7 +376,7 @@ uchar *my_large_malloc(size_t *size, myf my_flags)
ptr= NULL;
if (my_flags & MY_WME)
{
if (large_page_size)
if (large_page_size && errno == ENOMEM)
{
my_printf_error(EE_OUTOFMEMORY,
"Couldn't allocate %zu bytes (Large/HugeTLB memory "

View File

@ -34,6 +34,9 @@
#include <execinfo.h>
#endif
#ifdef HAVE_gcov
#include <gcov.h>
#endif
/**
Default handler for printing stacktrace
*/
@ -409,9 +412,6 @@ end:
/* Produce a core for the thread */
void my_write_core(int sig)
{
#ifdef HAVE_gcov
extern void __gcov_flush(void);
#endif
signal(sig, SIG_DFL);
#ifdef HAVE_gcov
/*
@ -419,7 +419,7 @@ void my_write_core(int sig)
information from this process, causing gcov output to be incomplete.
So we force the writing of coverage information here before terminating.
*/
__gcov_flush();
__gcov_dump();
#endif
pthread_kill(pthread_self(), sig);
#if defined(P_MYID) && !defined(SCO)

View File

@ -101,7 +101,7 @@ public:
uchar source_tail[MY_AES_BLOCK_SIZE];
MyCTX_nopad() : MyCTX() { }
~MyCTX_nopad() { }
~MyCTX_nopad() = default;
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
const uchar *iv, uint ivlen)

View File

@ -189,9 +189,7 @@ database::database(const config& c)
{
}
database::~database()
{
}
database::~database() = default;
dbcontext_ptr
database::create_context(bool for_write) volatile
@ -226,9 +224,7 @@ dbcontext::dbcontext(volatile database *d, bool for_write)
user_level_lock_timeout = d->get_conf().get_int("wrlock_timeout", 12);
}
dbcontext::~dbcontext()
{
}
dbcontext::~dbcontext() = default;
namespace {

Some files were not shown because too many files have changed in this diff Show More