summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/ctype_casefolding.inc18
-rw-r--r--mysql-test/main/ctype_ldml.result48
-rw-r--r--mysql-test/main/ctype_ldml.test24
-rw-r--r--mysql-test/main/ctype_uca.result8
-rw-r--r--mysql-test/main/ctype_utf8_uca.result174
-rw-r--r--mysql-test/main/ctype_utf8_uca.test29
-rw-r--r--mysql-test/main/ctype_utf8mb4_uca.result174
-rw-r--r--mysql-test/main/ctype_utf8mb4_uca.test29
-rw-r--r--mysql-test/main/delete.result32
-rw-r--r--mysql-test/main/delete.test41
-rw-r--r--mysql-test/main/multi_update.result120
-rw-r--r--mysql-test/main/multi_update.test70
-rw-r--r--mysql-test/main/update_use_source.result12
-rw-r--r--mysql-test/suite/galera/r/MDEV-24143.result23
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_get_lock.result18
-rw-r--r--mysql-test/suite/galera/t/MDEV-24143.test20
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_get_lock.test36
-rw-r--r--mysql-test/suite/mariabackup/full_backup_win.result12
-rw-r--r--mysql-test/suite/mariabackup/full_backup_win.test24
-rw-r--r--mysql-test/suite/plugins/r/locales.result5
-rw-r--r--mysql-test/suite/plugins/t/locales.test1
-rw-r--r--mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result12
-rw-r--r--mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test17
23 files changed, 840 insertions, 107 deletions
diff --git a/mysql-test/include/ctype_casefolding.inc b/mysql-test/include/ctype_casefolding.inc
new file mode 100644
index 00000000000..4ee402c95ad
--- /dev/null
+++ b/mysql-test/include/ctype_casefolding.inc
@@ -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;
diff --git a/mysql-test/main/ctype_ldml.result b/mysql-test/main/ctype_ldml.result
index 22b7a316111..3b02f3f3686 100644
--- a/mysql-test/main/ctype_ldml.result
+++ b/mysql-test/main/ctype_ldml.result
@@ -3036,6 +3036,54 @@ 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
+#
+#
+# Start of 10.4 tests
+#
+#
# MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO
#
SHOW COLLATION LIKE 'latin1_test_replace';
diff --git a/mysql-test/main/ctype_ldml.test b/mysql-test/main/ctype_ldml.test
index 8f5d88c50d4..ed15251c426 100644
--- a/mysql-test/main/ctype_ldml.test
+++ b/mysql-test/main/ctype_ldml.test
@@ -610,6 +610,30 @@ 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 # Start of 10.4 tests
+--echo #
--echo #
--echo # MDEV-7947 my_charset_same: strcmp() takes 0.37% in OLTP RO
diff --git a/mysql-test/main/ctype_uca.result b/mysql-test/main/ctype_uca.result
index af2798f12f3..2298733851d 100644
--- a/mysql-test/main/ctype_uca.result
+++ b/mysql-test/main/ctype_uca.result
@@ -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 ʉ
diff --git a/mysql-test/main/ctype_utf8_uca.result b/mysql-test/main/ctype_utf8_uca.result
index fe162295a29..7475eb5d8c9 100644
--- a/mysql-test/main/ctype_utf8_uca.result
+++ b/mysql-test/main/ctype_utf8_uca.result
@@ -587,3 +587,177 @@ 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 utf8 COLLATE utf8_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 utf8 COLLATE utf8_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 utf8 COLLATE utf8_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 utf8 COLLATE utf8_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 utf8 COLLATE utf8_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
+#
diff --git a/mysql-test/main/ctype_utf8_uca.test b/mysql-test/main/ctype_utf8_uca.test
index 0879b4d2810..38bcce8f4ba 100644
--- a/mysql-test/main/ctype_utf8_uca.test
+++ b/mysql-test/main/ctype_utf8_uca.test
@@ -21,3 +21,32 @@ SET NAMES utf8 COLLATE utf8_unicode_nopad_ci;
--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 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 #
diff --git a/mysql-test/main/ctype_utf8mb4_uca.result b/mysql-test/main/ctype_utf8mb4_uca.result
index 8b19412a69b..65d8a07a3f3 100644
--- a/mysql-test/main/ctype_utf8mb4_uca.result
+++ b/mysql-test/main/ctype_utf8mb4_uca.result
@@ -6605,3 +6605,177 @@ SET NAMES utf8mb4;
#
# 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_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
+#
diff --git a/mysql-test/main/ctype_utf8mb4_uca.test b/mysql-test/main/ctype_utf8mb4_uca.test
index 7a95da8468c..81f07d7e03f 100644
--- a/mysql-test/main/ctype_utf8mb4_uca.test
+++ b/mysql-test/main/ctype_utf8mb4_uca.test
@@ -108,3 +108,32 @@ SET NAMES utf8mb4;
--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_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 #
diff --git a/mysql-test/main/delete.result b/mysql-test/main/delete.result
index ed3683d52f9..7a9963abc71 100644
--- a/mysql-test/main/delete.result
+++ b/mysql-test/main/delete.result
@@ -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
diff --git a/mysql-test/main/delete.test b/mysql-test/main/delete.test
index c82420640c2..6d898ec769d 100644
--- a/mysql-test/main/delete.test
+++ b/mysql-test/main/delete.test
@@ -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
diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result
index 61e04c3d4a9..d6cf9ba685f 100644
--- a/mysql-test/main/multi_update.result
+++ b/mysql-test/main/multi_update.result
@@ -1251,3 +1251,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
diff --git a/mysql-test/main/multi_update.test b/mysql-test/main/multi_update.test
index 54c64918e03..48e6250393b 100644
--- a/mysql-test/main/multi_update.test
+++ b/mysql-test/main/multi_update.test
@@ -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
diff --git a/mysql-test/main/update_use_source.result b/mysql-test/main/update_use_source.result
index 9e43b54d81c..57787671e77 100644
--- a/mysql-test/main/update_use_source.result
+++ b/mysql-test/main/update_use_source.result
@@ -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
diff --git a/mysql-test/suite/galera/r/MDEV-24143.result b/mysql-test/suite/galera/r/MDEV-24143.result
deleted file mode 100644
index 860d8a35834..00000000000
--- a/mysql-test/suite/galera/r/MDEV-24143.result
+++ /dev/null
@@ -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;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
deleted file mode 100644
index 0ef2a1a72c6..00000000000
--- a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
+++ /dev/null
@@ -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;
diff --git a/mysql-test/suite/galera/t/MDEV-24143.test b/mysql-test/suite/galera/t/MDEV-24143.test
deleted file mode 100644
index e58f147cb7c..00000000000
--- a/mysql-test/suite/galera/t/MDEV-24143.test
+++ /dev/null
@@ -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;
-
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_get_lock.test b/mysql-test/suite/galera/t/galera_bf_abort_get_lock.test
deleted file mode 100644
index 72fc1c5b583..00000000000
--- a/mysql-test/suite/galera/t/galera_bf_abort_get_lock.test
+++ /dev/null
@@ -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;
diff --git a/mysql-test/suite/mariabackup/full_backup_win.result b/mysql-test/suite/mariabackup/full_backup_win.result
new file mode 100644
index 00000000000..940c7056d3f
--- /dev/null
+++ b/mysql-test/suite/mariabackup/full_backup_win.result
@@ -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
+#
diff --git a/mysql-test/suite/mariabackup/full_backup_win.test b/mysql-test/suite/mariabackup/full_backup_win.test
new file mode 100644
index 00000000000..5a1d1c38026
--- /dev/null
+++ b/mysql-test/suite/mariabackup/full_backup_win.test
@@ -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 #
diff --git a/mysql-test/suite/plugins/r/locales.result b/mysql-test/suite/plugins/r/locales.result
index 2ea88493705..e906d27c21e 100644
--- a/mysql-test/suite/plugins/r/locales.result
+++ b/mysql-test/suite/plugins/r/locales.result
@@ -1,3 +1,4 @@
+SET names utf8;
select * from information_schema.locales;
ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOUSAND_SEP ERROR_MESSAGE_LANGUAGE
0 en_US English - United States 9 9 . , english
@@ -52,7 +53,7 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU
49 ta_IN Tamil - India 10 8 . , english
50 te_IN Telugu - India 10 9 . , english
51 th_TH Thai - Thailand 10 8 . , english
-52 tr_TR Turkish - Turkey 7 9 , . english
+52 tr_TR Turkish - Türkiye 7 9 , . english
53 uk_UA Ukrainian - Ukraine 8 9 , . ukrainian
54 ur_PK Urdu - Pakistan 6 6 . , english
55 vi_VN Vietnamese - Vietnam 16 11 , . english
@@ -165,7 +166,7 @@ Id Name Description Error_Message_Language
49 ta_IN Tamil - India english
50 te_IN Telugu - India english
51 th_TH Thai - Thailand english
-52 tr_TR Turkish - Turkey english
+52 tr_TR Turkish - Türkiye english
53 uk_UA Ukrainian - Ukraine ukrainian
54 ur_PK Urdu - Pakistan english
55 vi_VN Vietnamese - Vietnam english
diff --git a/mysql-test/suite/plugins/t/locales.test b/mysql-test/suite/plugins/t/locales.test
index a3afe75046f..2b4d56433d9 100644
--- a/mysql-test/suite/plugins/t/locales.test
+++ b/mysql-test/suite/plugins/t/locales.test
@@ -2,6 +2,7 @@ if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'lo
{
--skip LOCALES plugin is not active
}
+SET names utf8;
select * from information_schema.locales;
show locales;
diff --git a/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result b/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result
index f783b1e0783..b00a8a5e1d7 100644
--- a/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result
+++ b/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result
@@ -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;
diff --git a/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test b/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test
index 4bcb7ad9e3f..1ac1bc14468 100644
--- a/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test
+++ b/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test
@@ -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