summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-12-07 09:39:46 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-12-07 09:39:46 +0200
commit9e27e53dfac1c911a593065a0fcadc5729957d29 (patch)
tree679b56d887a1544264a9f872a2d8b3a7659cd8f2 /mysql-test
parentb7ae4d442aa32752798f1d3b6122c35c4ebe2d07 (diff)
parent9044e016c54762300beb2cd609b41c285bbf8794 (diff)
downloadmariadb-git-9e27e53dfac1c911a593065a0fcadc5729957d29.tar.gz
Merge 10.6 into 10.7
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/ctype_tis620.result25
-rw-r--r--mysql-test/main/ctype_tis620.test31
-rw-r--r--mysql-test/main/derived_view.result2
-rw-r--r--mysql-test/main/having.result6
-rw-r--r--mysql-test/main/show_explain.result6
-rw-r--r--mysql-test/main/sp.result40
-rw-r--r--mysql-test/main/sp.test37
-rw-r--r--mysql-test/main/user_var.result4
-rw-r--r--mysql-test/main/win.result24
-rw-r--r--mysql-test/main/win.test28
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result24
-rw-r--r--mysql-test/suite/galera/r/MDEV-25389.result17
-rw-r--r--mysql-test/suite/galera/r/MDEV-29512.result40
-rw-r--r--mysql-test/suite/galera/r/galera_var_dirty_reads.result6
-rw-r--r--mysql-test/suite/galera/t/MDEV-25389.test24
-rw-r--r--mysql-test/suite/galera/t/MDEV-29512.cnf15
-rw-r--r--mysql-test/suite/galera/t/MDEV-29512.test91
-rw-r--r--mysql-test/suite/galera/t/galera_var_dirty_reads.test6
-rw-r--r--mysql-test/suite/galera_3nodes_sr/disabled.def1
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-336.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_tis620.result66
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_tis620.test62
-rw-r--r--mysql-test/suite/mariabackup/apply-log-only-incr.test1
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup.test1
-rw-r--r--mysql-test/suite/mariabackup/incremental_compressed.test1
-rw-r--r--mysql-test/suite/mariabackup/incremental_ddl_before_backup.test1
-rw-r--r--mysql-test/suite/mariabackup/incremental_ddl_during_backup.test1
-rw-r--r--mysql-test/suite/mariabackup/incremental_encrypted.test1
-rw-r--r--mysql-test/suite/mariabackup/incremental_newdb_while_backup.test1
-rw-r--r--mysql-test/suite/mariabackup/log_page_corruption.test1
-rw-r--r--mysql-test/suite/mariabackup/unsupported_redo.test1
-rw-r--r--mysql-test/suite/mariabackup/xb_partition.test1
-rw-r--r--mysql-test/suite/parts/r/part_ctype_tis620.result47
-rw-r--r--mysql-test/suite/parts/t/part_ctype_tis620.test52
-rw-r--r--mysql-test/suite/period/r/create.result11
-rw-r--r--mysql-test/suite/period/r/delete.result24
-rw-r--r--mysql-test/suite/period/t/create.test14
-rw-r--r--mysql-test/suite/period/t/delete.test28
-rw-r--r--mysql-test/suite/sysschema/disabled.def12
39 files changed, 748 insertions, 16 deletions
diff --git a/mysql-test/main/ctype_tis620.result b/mysql-test/main/ctype_tis620.result
index f86c2574582..10b7042f709 100644
--- a/mysql-test/main/ctype_tis620.result
+++ b/mysql-test/main/ctype_tis620.result
@@ -4472,3 +4472,28 @@ HEX(WEIGHT_STRING(_tis620 'a\0b' COLLATE tis620_thai_nopad_ci))
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+#
+CREATE OR REPLACE TABLE t1
+(
+a VARCHAR(250) COLLATE tis620_thai_nopad_ci,
+UNIQUE KEY(a(100)) USING HASH
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('a'),('A');
+ERROR 23000: Duplicate entry 'A' for key 'a'
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1
+(
+a CHAR(250) COLLATE tis620_thai_nopad_ci,
+UNIQUE KEY(a(100)) USING HASH
+) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('a'),('A');
+ERROR 23000: Duplicate entry 'A' for key 'a'
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/ctype_tis620.test b/mysql-test/main/ctype_tis620.test
index f432b23d71c..39908b995b2 100644
--- a/mysql-test/main/ctype_tis620.test
+++ b/mysql-test/main/ctype_tis620.test
@@ -223,3 +223,34 @@ SELECT HEX(WEIGHT_STRING(_tis620 'a\0b' COLLATE tis620_thai_nopad_ci));
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+--echo #
+
+CREATE OR REPLACE TABLE t1
+(
+ a VARCHAR(250) COLLATE tis620_thai_nopad_ci,
+ UNIQUE KEY(a(100)) USING HASH
+) ENGINE=MyISAM;
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES ('a'),('A');
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1
+
+(
+ a CHAR(250) COLLATE tis620_thai_nopad_ci,
+ UNIQUE KEY(a(100)) USING HASH
+) ENGINE=MyISAM;
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES ('a'),('A');
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/derived_view.result b/mysql-test/main/derived_view.result
index 50f6d381dd6..15a7784c890 100644
--- a/mysql-test/main/derived_view.result
+++ b/mysql-test/main/derived_view.result
@@ -2696,7 +2696,7 @@ ON p.id = g.p_random
ORDER BY gallery_name ASC
;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 10 Using filesort
1 PRIMARY p eq_ref PRIMARY PRIMARY 4 g.p_random 1 Using where
2 DERIVED gal ALL NULL NULL NULL NULL 10
3 DEPENDENT SUBQUERY pi ref gallery_id gallery_id 4 test.gal.id 4 Using temporary; Using filesort
diff --git a/mysql-test/main/having.result b/mysql-test/main/having.result
index ac26d69543d..d7cbadd5e75 100644
--- a/mysql-test/main/having.result
+++ b/mysql-test/main/having.result
@@ -834,13 +834,13 @@ test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t) GROUP BY t HAVING r = 1 ORDER BY t1.u;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort
+1 SIMPLE t1 index NULL t 5 NULL 8 Using temporary; Using filesort
SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t) GROUP BY t HAVING r = 1 ORDER BY t1.u;
t r
10 1
12 1
-14 1
-16 1
+15 1
+17 1
DROP TABLE t1;
DROP FUNCTION next_seq_value;
DROP TABLE series;
diff --git a/mysql-test/main/show_explain.result b/mysql-test/main/show_explain.result
index 317a12ef311..6ad93930448 100644
--- a/mysql-test/main/show_explain.result
+++ b/mysql-test/main/show_explain.result
@@ -1007,7 +1007,7 @@ SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
ORDER BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using temporary; Using filesort
+1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort
set @show_explain_probe_select_id=1;
SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT a+SLEEP(0.01) FROM t1
@@ -1016,7 +1016,7 @@ ORDER BY b;
connection default;
show explain for $thr2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using temporary; Using filesort
+1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort
Warnings:
Note 1003 SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
@@ -1039,7 +1039,7 @@ ORDER BY b;
connection default;
show explain for $thr2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using temporary; Using filesort
+1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort
Warnings:
Note 1003 SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 37fdf62a6a9..37c22e45b45 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -8933,6 +8933,46 @@ DROP TABLE t1;
# End of 10.4 tests
#
#
+# MDEV-29129: Performance regression starting in 10.6: unlimited "select order by limit"
+#
+CREATE TABLE t1 (
+lookupId int primary key,
+value varchar(255)
+);
+insert into t1 select seq, seq from seq_1_to_100;
+# Note: the function is intentionally NOT declared as DETERMINISTIC
+CREATE FUNCTION f1(LOOKUPID_IN INT) RETURNS varchar(255) CHARSET utf8
+BEGIN
+DECLARE LOOKUP_VALUE VARCHAR(255);
+SET LOOKUP_VALUE = (SELECT value FROM t1 WHERE lookupId = LOOKUPID_IN);
+set @counter=@counter+1;
+RETURN LOOKUP_VALUE;
+END;
+//
+create table t2 (
+col1 int,
+col2 int
+);
+insert into t2 select mod(seq,100), seq from seq_1_to_1000;
+explain
+select f1(col1) from t2 order by col2 desc limit 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 Using filesort
+set @counter=0;
+select f1(col1) from t2 order by col2 desc limit 5;
+f1(col1)
+NULL
+99
+98
+97
+96
+# Must show 5, not 1000:
+select @counter;
+@counter
+5
+drop function f1;
+drop table t1,t2;
+#
# MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
#
CREATE PROCEDURE sp() SELECT 1 INTO @;
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 57038c82761..2e3a492659e 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -10521,6 +10521,43 @@ DROP TABLE t1;
--echo #
--echo #
+--echo # MDEV-29129: Performance regression starting in 10.6: unlimited "select order by limit"
+--echo #
+
+CREATE TABLE t1 (
+ lookupId int primary key,
+ value varchar(255)
+);
+insert into t1 select seq, seq from seq_1_to_100;
+
+-- echo # Note: the function is intentionally NOT declared as DETERMINISTIC
+delimiter //;
+CREATE FUNCTION f1(LOOKUPID_IN INT) RETURNS varchar(255) CHARSET utf8
+BEGIN
+ DECLARE LOOKUP_VALUE VARCHAR(255);
+ SET LOOKUP_VALUE = (SELECT value FROM t1 WHERE lookupId = LOOKUPID_IN);
+ set @counter=@counter+1;
+ RETURN LOOKUP_VALUE;
+END;
+//
+delimiter ;//
+
+create table t2 (
+ col1 int,
+ col2 int
+);
+insert into t2 select mod(seq,100), seq from seq_1_to_1000;
+
+explain
+select f1(col1) from t2 order by col2 desc limit 5;
+set @counter=0;
+select f1(col1) from t2 order by col2 desc limit 5;
+--echo # Must show 5, not 1000:
+select @counter;
+drop function f1;
+drop table t1,t2;
+
+--echo #
--echo # MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
--echo #
diff --git a/mysql-test/main/user_var.result b/mysql-test/main/user_var.result
index 924c252b951..a5837996c19 100644
--- a/mysql-test/main/user_var.result
+++ b/mysql-test/main/user_var.result
@@ -372,14 +372,14 @@ insert into t1 (b) values (10), (30), (10), (10);
set @var := 0;
explain select if(b=@var, 999, b) , @var := b from t1 order by b;
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
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
set @var := 0;
select if(b=@var, 999, b) , @var := b from t1 order by b;
if(b=@var, 999, b) @var := b
10 10
-10 10
30 30
999 10
+999 10
drop table t1;
create temporary table t1 (id int);
insert into t1 values (2), (3), (3), (4);
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index 0874e5b9a24..3e130c9653e 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -4352,3 +4352,27 @@ row_number() OVER (order by a)
2
3
drop table t1;
+#
+# MDEV-28206 SIGSEGV in Item_field::fix_fields when using LEAD...OVER
+#
+CREATE TABLE t(c1 INT);
+CREATE FUNCTION f() RETURNS INT READS SQL DATA BEGIN
+DECLARE v INT;
+SELECT 1 INTO v FROM (SELECT c1,COALESCE(LEAD(a2.c1) OVER (PARTITION BY a2.c1 ORDER BY a2.c1),a2.c1) AS a1 FROM (t a2 JOIN t a3 USING (c1))) a4;
+RETURN 1;
+END//
+SELECT f(),f();
+f() f()
+1 1
+EXECUTE IMMEDIATE "SELECT LEAD(c1) OVER (ORDER BY c1) FROM t NATURAL JOIN t AS a;";
+LEAD(c1) OVER (ORDER BY c1)
+EXECUTE IMMEDIATE "SELECT SUM(c1) OVER (ORDER BY c1) FROM t NATURAL JOIN t AS a;";
+SUM(c1) OVER (ORDER BY c1)
+EXECUTE IMMEDIATE "SELECT LEAD(c) OVER (ORDER BY c) FROM (SELECT 1 AS c) AS a NATURAL JOIN (SELECT 1 AS c) AS b;";
+LEAD(c) OVER (ORDER BY c)
+NULL
+DROP FUNCTION f;
+DROP TABLE t;
+#
+# End of 10.6 tests
+#
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index 5a216123369..d7f52ec32e9 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2829,3 +2829,31 @@ create table t1 (a int);
insert into t1 values (1),(2),(3);
SELECT row_number() OVER (order by a) FROM t1 order by NAME_CONST('myname',NULL);
drop table t1;
+
+--echo #
+--echo # MDEV-28206 SIGSEGV in Item_field::fix_fields when using LEAD...OVER
+--echo #
+
+CREATE TABLE t(c1 INT);
+
+DELIMITER //;
+CREATE FUNCTION f() RETURNS INT READS SQL DATA BEGIN
+ DECLARE v INT;
+ SELECT 1 INTO v FROM (SELECT c1,COALESCE(LEAD(a2.c1) OVER (PARTITION BY a2.c1 ORDER BY a2.c1),a2.c1) AS a1 FROM (t a2 JOIN t a3 USING (c1))) a4;
+ RETURN 1;
+END//
+DELIMITER ;//
+
+SELECT f(),f();
+
+EXECUTE IMMEDIATE "SELECT LEAD(c1) OVER (ORDER BY c1) FROM t NATURAL JOIN t AS a;";
+EXECUTE IMMEDIATE "SELECT SUM(c1) OVER (ORDER BY c1) FROM t NATURAL JOIN t AS a;";
+
+EXECUTE IMMEDIATE "SELECT LEAD(c) OVER (ORDER BY c) FROM (SELECT 1 AS c) AS a NATURAL JOIN (SELECT 1 AS c) AS b;";
+
+DROP FUNCTION f;
+DROP TABLE t;
+
+--echo #
+--echo # End of 10.6 tests
+--echo #
diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
index fb4738a1fed..2b91cd638e2 100644
--- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -4359,6 +4359,30 @@ row_number() OVER (order by a)
3
drop table t1;
#
+# MDEV-28206 SIGSEGV in Item_field::fix_fields when using LEAD...OVER
+#
+CREATE TABLE t(c1 INT);
+CREATE FUNCTION f() RETURNS INT READS SQL DATA BEGIN
+DECLARE v INT;
+SELECT 1 INTO v FROM (SELECT c1,COALESCE(LEAD(a2.c1) OVER (PARTITION BY a2.c1 ORDER BY a2.c1),a2.c1) AS a1 FROM (t a2 JOIN t a3 USING (c1))) a4;
+RETURN 1;
+END//
+SELECT f(),f();
+f() f()
+1 1
+EXECUTE IMMEDIATE "SELECT LEAD(c1) OVER (ORDER BY c1) FROM t NATURAL JOIN t AS a;";
+LEAD(c1) OVER (ORDER BY c1)
+EXECUTE IMMEDIATE "SELECT SUM(c1) OVER (ORDER BY c1) FROM t NATURAL JOIN t AS a;";
+SUM(c1) OVER (ORDER BY c1)
+EXECUTE IMMEDIATE "SELECT LEAD(c) OVER (ORDER BY c) FROM (SELECT 1 AS c) AS a NATURAL JOIN (SELECT 1 AS c) AS b;";
+LEAD(c) OVER (ORDER BY c)
+NULL
+DROP FUNCTION f;
+DROP TABLE t;
+#
+# End of 10.6 tests
+#
+#
# MDEV-23867: select crash in compute_window_func
#
set @save_sort_buffer_size=@@sort_buffer_size;
diff --git a/mysql-test/suite/galera/r/MDEV-25389.result b/mysql-test/suite/galera/r/MDEV-25389.result
new file mode 100644
index 00000000000..f369fe4dbae
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-25389.result
@@ -0,0 +1,17 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+call mtr.add_suppression("WSREP: Failed to create/initialize system thread");
+SET GLOBAL debug_dbug='+d,wsrep_simulate_failed_connection_1';
+SET GLOBAL wsrep_slave_threads=2;
+ERROR HY000: Incorrect arguments to SET
+SELECT @@wsrep_slave_threads;
+@@wsrep_slave_threads
+1
+SET GLOBAL debug_dbug='';
+SET GLOBAL wsrep_slave_threads=1;
+SELECT @@wsrep_slave_threads;
+@@wsrep_slave_threads
+1
diff --git a/mysql-test/suite/galera/r/MDEV-29512.result b/mysql-test/suite/galera/r/MDEV-29512.result
new file mode 100644
index 00000000000..aaf24df920e
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-29512.result
@@ -0,0 +1,40 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 varchar(2000));
+INSERT INTO t1 VALUES (1, 0, REPEAT('1234567890', 200));
+INSERT INTO t1 VALUES (3, 3, REPEAT('1234567890', 200));
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_sync_wait=0;
+connection node_1;
+begin;
+select f1,f2 from t1;
+f1 f2
+1 0
+3 3
+connection node_2;
+UPDATE t1 SET f2=2 WHERE f1=3;
+connection node_1a;
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_1;
+UPDATE t1 SET f2=1 WHERE f1=3;
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET GLOBAL debug_dbug = NULL;
+SET debug_sync='RESET';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+select f1,f2 from t1;
+f1 f2
+1 0
+3 2
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
index 240f1802385..2b164fecee6 100644
--- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result
+++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
@@ -19,9 +19,9 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status Disconnected
SELECT * FROM t1;
-Got one of the listed errors
+ERROR 08S01: WSREP has not yet prepared node for application use
SELECT 1 FROM t1;
-Got one of the listed errors
+ERROR 08S01: WSREP has not yet prepared node for application use
SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
i
@@ -34,7 +34,7 @@ i variable_name variable_value
1 WSREP_DIRTY_READS ON
SET @@session.wsrep_dirty_reads=OFF;
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
-Got one of the listed errors
+ERROR 08S01: WSREP has not yet prepared node for application use
SELECT 1;
1
1
diff --git a/mysql-test/suite/galera/t/MDEV-25389.test b/mysql-test/suite/galera/t/MDEV-25389.test
new file mode 100644
index 00000000000..fc523371918
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-25389.test
@@ -0,0 +1,24 @@
+--source include/galera_cluster.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+call mtr.add_suppression("WSREP: Failed to create/initialize system thread");
+SET GLOBAL debug_dbug='+d,wsrep_simulate_failed_connection_1';
+--error ER_WRONG_ARGUMENTS
+SET GLOBAL wsrep_slave_threads=2;
+SELECT @@wsrep_slave_threads;
+SET GLOBAL debug_dbug='';
+SET GLOBAL wsrep_slave_threads=1;
+SELECT @@wsrep_slave_threads;
+
+# MDEV-29878: this test caused a subsequent test to fail
+# during shutdown. Do a restart here, to make sure the
+# issue is fixed.
+--source include/restart_mysqld.inc
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/MDEV-29512.cnf b/mysql-test/suite/galera/t/MDEV-29512.cnf
new file mode 100644
index 00000000000..bf8e0c37984
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-29512.cnf
@@ -0,0 +1,15 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin
+log-slave-updates
+
+[mysqld.1]
+log_bin
+log_slave_updates
+max-binlog-size=4096
+expire-logs-days=1
+
+
+[mysqld.2]
+
diff --git a/mysql-test/suite/galera/t/MDEV-29512.test b/mysql-test/suite/galera/t/MDEV-29512.test
new file mode 100644
index 00000000000..ffcef792f85
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-29512.test
@@ -0,0 +1,91 @@
+#
+# This test is for reproducing the issue in:
+# https://jira.mariadb.org/browse/MDEV-29512
+#
+# The hanging in MDEV-29512 happens when binlog purging is attempted, and there is
+# one local BF aborted transaction waiting for commit monitor.
+#
+# The test will launch two node cluster and enable binlogging with expire log days,
+# to force binlog purging to happen.
+# A local transaction is executed so that will become BF abort victim, and has advanced
+# to replication stage waiting for commit monitor for final cleanup (to mark position in innodb)
+# after that, applier is released to complete the BF abort and due to binlog configuration,
+# starting the binlog purging. This is where the hanging would occur, if code is buggy
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+#
+# binlog size is limited to 4096 bytes, we will create enough events to
+# cause binlog rotation
+#
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 varchar(2000));
+INSERT INTO t1 VALUES (1, 0, REPEAT('1234567890', 200));
+INSERT INTO t1 VALUES (3, 3, REPEAT('1234567890', 200));
+
+SET SESSION wsrep_sync_wait=0;
+
+# set sync point for replication applier
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
+
+# Control connection to manage sync points for appliers
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait=0;
+
+# starting local transaction, only select so far,
+# write will happen later and this will be ordered after the transaction in node_2
+--connection node_1
+begin;
+select f1,f2 from t1;
+
+# send from node 2 an UPDATE transaction, which will BF abort the transaction in node_1
+--connection node_2
+--let $wait_condition=select count(*)=2 from t1
+--source include/wait_condition.inc
+
+UPDATE t1 SET f2=2 WHERE f1=3;
+
+--connection node_1a
+# wait to see the UPDATE from node_2 in apply_cb sync point
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_1
+# now issuing conflicting update
+UPDATE t1 SET f2=1 WHERE f1=3;
+
+# Block the local commit, send final COMMIT and wait until it gets blocked
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+--send COMMIT
+
+--connection node_1a
+# wait for the local commit to enter in commit monitor wait state
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# release the local transaction to continue with commit
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+# and now release the applier, it should force local trx to abort
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET GLOBAL debug_dbug = NULL;
+SET debug_sync='RESET';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+# wait until applying is complete
+--let $wait_condition = SELECT COUNT(*)=1 FROM t1 WHERE f2=2
+--source include/wait_condition.inc
+
+# final read to verify what we got
+select f1,f2 from t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
index 85f72e633dc..e0c5b666c32 100644
--- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test
+++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
@@ -31,10 +31,10 @@ SHOW STATUS LIKE 'wsrep_ready';
# Must return 'Disconnected'
SHOW STATUS LIKE 'wsrep_cluster_status';
---error ER_UNKNOWN_COM_ERROR,1047
+--error ER_UNKNOWN_COM_ERROR
SELECT * FROM t1;
---error ER_UNKNOWN_COM_ERROR,1047
+--error ER_UNKNOWN_COM_ERROR
SELECT 1 FROM t1;
SET @@session.wsrep_dirty_reads=ON;
@@ -46,7 +46,7 @@ SELECT i, variable_name, variable_value FROM t1, information_schema.session_vari
SET @@session.wsrep_dirty_reads=OFF;
---error ER_UNKNOWN_COM_ERROR,1047
+--error ER_UNKNOWN_COM_ERROR
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
diff --git a/mysql-test/suite/galera_3nodes_sr/disabled.def b/mysql-test/suite/galera_3nodes_sr/disabled.def
index 900b27860a5..f1ec92eee79 100644
--- a/mysql-test/suite/galera_3nodes_sr/disabled.def
+++ b/mysql-test/suite/galera_3nodes_sr/disabled.def
@@ -1,4 +1,3 @@
-GCF-336 :
GCF-582 :
GCF-810A :
GCF-810B :
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
index bb6c11edf36..eeccfa3b5a3 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
@@ -1,11 +1,17 @@
+connection node_2;
+connection node_1;
+connection node_2;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
COUNT(*) > 0
1
+connection node_1;
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
COUNT(*) > 0
1
@@ -13,14 +19,19 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT COUNT(*) > 0 FROM t1;
COUNT(*) > 0
1
+connection node_2a;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait=0;
+connection node_2;
INSERT INTO t1 VALUES (2);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
COMMIT;
ERROR 08S01: WSREP has not yet prepared node for application use
+connection node_2a;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
DROP TABLE t1;
CALL mtr.add_suppression("replication aborted");
CALL mtr.add_suppression("WSREP: fragment replication failed: 3");
CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_tis620.result b/mysql-test/suite/innodb/r/innodb_ctype_tis620.result
index bea188af08f..cf15d1232aa 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_tis620.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_tis620.result
@@ -26,3 +26,69 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+#
+CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(8), KEY(a)) ENGINE=InnoDB COLLATE tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+DROP TABLE t1;
+#
+# MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+#
+CREATE TABLE t1 (a INT KEY,b INT,c CHAR,KEY(b),KEY(c)) ROW_FORMAT=REDUNDANT COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+INSERT INTO t1 VALUES (3,4,4);
+DROP TABLE t1;
+CREATE TABLE t1 (C1 CHAR KEY,B1 BIT,B2 BIT,C2 CHAR DEFAULT'') ROW_FORMAT=DYNAMIC COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+SELECT HEX(c1),HEX (c2) FROM t1 WHERE c1>=''AND c1<''AND c2=''LIMIT 2;
+HEX(c1) HEX (c2)
+DROP TABLE t1;
+SET sql_mode='';
+CREATE TABLE t1 (a INT UNSIGNED,b INT,c CHAR(1),d BINARY (1),e VARCHAR(1),f VARBINARY(1),g BLOB,h BLOB,id INT,KEY(b),KEY(e)) ROW_FORMAT=REDUNDANT COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+INSERT INTO t1 VALUES (4386060749083099108,157,0,0,0,0,0,0,12);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+INSERT INTO t1 VALUES (104,15158706241929488558,0,0,0,0,0,0,13);
+Warnings:
+Warning 1264 Out of range value for column 'b' at row 1
+SELECT GROUP_CONCAT(DISTINCT a,b ORDER BY c,b) FROM t1;
+GROUP_CONCAT(DISTINCT a,b ORDER BY c,b)
+4294967295157,1042147483647
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (a CHAR(9),b CHAR(7)) COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
+ALTER TABLE t1 ADD INDEX kb (b),ADD INDEX kab (a,b),ALGORITHM=INPLACE;
+DROP TABLE t1;
+SET sql_mode='';
+CREATE TABLE t1 (a INT UNSIGNED,b INT UNSIGNED,c CHAR(1),d CHAR(1),e VARCHAR(1),f VARCHAR(1),g BLOB,h BLOB,id INT,KEY(b),KEY(e)) ROW_FORMAT=REDUNDANT COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (15842995496588415350,5339224446865937973,0,0,0,0,0,0,4);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'b' at row 1
+INSERT INTO t1 VALUES (8118894032862615316,5299008984764990929,0,0,0,0,0,0,1);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'b' at row 1
+SELECT GROUP_CONCAT(DISTINCT a,c ORDER BY a) FROM t1;
+GROUP_CONCAT(DISTINCT a,c ORDER BY a)
+42949672950
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+CREATE TABLE t1 (a CHAR,b CHAR,KEY(a,b)) ROW_FORMAT=DYNAMIC COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0,0);
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR,b CHAR) COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (0,0);
+SELECT a,SUM(DISTINCT a),MIN(b) FROM t1 GROUP BY a;
+a SUM(DISTINCT a) MIN(b)
+0 0 0
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR,KEY(a)) ENGINE=InnoDB COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (0);
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_tis620.test b/mysql-test/suite/innodb/t/innodb_ctype_tis620.test
index 4bab0fe9561..b0e9f42cc5a 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_tis620.test
+++ b/mysql-test/suite/innodb/t/innodb_ctype_tis620.test
@@ -27,3 +27,65 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+--echo #
+
+CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(8), KEY(a)) ENGINE=InnoDB COLLATE tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+--echo #
+
+CREATE TABLE t1 (a INT KEY,b INT,c CHAR,KEY(b),KEY(c)) ROW_FORMAT=REDUNDANT COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+INSERT INTO t1 VALUES (3,4,4);
+DROP TABLE t1;
+
+CREATE TABLE t1 (C1 CHAR KEY,B1 BIT,B2 BIT,C2 CHAR DEFAULT'') ROW_FORMAT=DYNAMIC COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+SELECT HEX(c1),HEX (c2) FROM t1 WHERE c1>=''AND c1<''AND c2=''LIMIT 2;
+DROP TABLE t1;
+
+SET sql_mode='';
+CREATE TABLE t1 (a INT UNSIGNED,b INT,c CHAR(1),d BINARY (1),e VARCHAR(1),f VARBINARY(1),g BLOB,h BLOB,id INT,KEY(b),KEY(e)) ROW_FORMAT=REDUNDANT COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+INSERT INTO t1 VALUES (4386060749083099108,157,0,0,0,0,0,0,12);
+INSERT INTO t1 VALUES (104,15158706241929488558,0,0,0,0,0,0,13);
+SELECT GROUP_CONCAT(DISTINCT a,b ORDER BY c,b) FROM t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+CREATE TABLE t1 (a CHAR(9),b CHAR(7)) COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
+ALTER TABLE t1 ADD INDEX kb (b),ADD INDEX kab (a,b),ALGORITHM=INPLACE;
+DROP TABLE t1;
+
+SET sql_mode='';
+CREATE TABLE t1 (a INT UNSIGNED,b INT UNSIGNED,c CHAR(1),d CHAR(1),e VARCHAR(1),f VARCHAR(1),g BLOB,h BLOB,id INT,KEY(b),KEY(e)) ROW_FORMAT=REDUNDANT COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (15842995496588415350,5339224446865937973,0,0,0,0,0,0,4);
+INSERT INTO t1 VALUES (8118894032862615316,5299008984764990929,0,0,0,0,0,0,1);
+SELECT GROUP_CONCAT(DISTINCT a,c ORDER BY a) FROM t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+CREATE TABLE t1 (a CHAR,b CHAR,KEY(a,b)) ROW_FORMAT=DYNAMIC COLLATE=tis620_thai_nopad_ci ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0,0);
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR,b CHAR) COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (0,0);
+SELECT a,SUM(DISTINCT a),MIN(b) FROM t1 GROUP BY a;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR,KEY(a)) ENGINE=InnoDB COLLATE=tis620_thai_nopad_ci;
+INSERT INTO t1 VALUES (0);
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.test b/mysql-test/suite/mariabackup/apply-log-only-incr.test
index c2d23c88a3e..b110d12540e 100644
--- a/mysql-test/suite/mariabackup/apply-log-only-incr.test
+++ b/mysql-test/suite/mariabackup/apply-log-only-incr.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/innodb_undo_tablespaces.inc
call mtr.add_suppression("InnoDB: New log files created");
diff --git a/mysql-test/suite/mariabackup/incremental_backup.test b/mysql-test/suite/mariabackup/incremental_backup.test
index ec38af4c27d..fed2d5e60a9 100644
--- a/mysql-test/suite/mariabackup/incremental_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_backup.test
@@ -1,5 +1,6 @@
--source include/have_aria.inc
--source include/innodb_page_size.inc
+--source include/innodb_undo_tablespaces.inc
# see suite.pm "check for exact values, in case the default changes to be small everywhere"
if (`select @@max_binlog_stmt_cache_size = 4294963200 and @@innodb_page_size = 65536`) {
diff --git a/mysql-test/suite/mariabackup/incremental_compressed.test b/mysql-test/suite/mariabackup/incremental_compressed.test
index 32607d57174..15aff909a43 100644
--- a/mysql-test/suite/mariabackup/incremental_compressed.test
+++ b/mysql-test/suite/mariabackup/incremental_compressed.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_partition.inc
+--source include/innodb_undo_tablespaces.inc
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
diff --git a/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test b/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test
index f243ac1acd9..6d34166d7b5 100644
--- a/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_ddl_before_backup.test
@@ -1,4 +1,5 @@
--source include/have_debug.inc
+--source include/innodb_undo_tablespaces.inc
call mtr.add_suppression("InnoDB: New log files created");
diff --git a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test
index d7ba15c28ae..d9c6a72b5ee 100644
--- a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test
@@ -1,4 +1,5 @@
--source include/have_debug.inc
+--source include/innodb_undo_tablespaces.inc
call mtr.add_suppression("InnoDB: New log files created");
diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.test b/mysql-test/suite/mariabackup/incremental_encrypted.test
index e618ac4f79e..d5570f20006 100644
--- a/mysql-test/suite/mariabackup/incremental_encrypted.test
+++ b/mysql-test/suite/mariabackup/incremental_encrypted.test
@@ -1,4 +1,5 @@
--source include/innodb_page_size.inc
+--source include/innodb_undo_tablespaces.inc
if (!$EXAMPLE_KEY_MANAGEMENT_SO)
{
diff --git a/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test b/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test
index c4695edb845..6bd69712ed7 100644
--- a/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_newdb_while_backup.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
+--source include/innodb_undo_tablespaces.inc
call mtr.add_suppression("InnoDB: New log files created");
diff --git a/mysql-test/suite/mariabackup/log_page_corruption.test b/mysql-test/suite/mariabackup/log_page_corruption.test
index b9b3a6e6a7b..2b101529039 100644
--- a/mysql-test/suite/mariabackup/log_page_corruption.test
+++ b/mysql-test/suite/mariabackup/log_page_corruption.test
@@ -1,5 +1,6 @@
--source include/have_debug.inc
--source include/no_valgrind_without_big.inc
+--source include/innodb_undo_tablespaces.inc
--echo ########
--echo # Test for generating "innodb_corrupted_pages" file during full and
diff --git a/mysql-test/suite/mariabackup/unsupported_redo.test b/mysql-test/suite/mariabackup/unsupported_redo.test
index b02bcc3f695..97e1cad222d 100644
--- a/mysql-test/suite/mariabackup/unsupported_redo.test
+++ b/mysql-test/suite/mariabackup/unsupported_redo.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/innodb_undo_tablespaces.inc
call mtr.add_suppression("InnoDB: New log files created");
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation");
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
diff --git a/mysql-test/suite/mariabackup/xb_partition.test b/mysql-test/suite/mariabackup/xb_partition.test
index 3d027b67fc1..1c8eeaa19e6 100644
--- a/mysql-test/suite/mariabackup/xb_partition.test
+++ b/mysql-test/suite/mariabackup/xb_partition.test
@@ -1,5 +1,6 @@
#--source include/innodb_page_size.inc
--source include/have_partition.inc
+--source include/innodb_undo_tablespaces.inc
CREATE TABLE t1(a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (3);
diff --git a/mysql-test/suite/parts/r/part_ctype_tis620.result b/mysql-test/suite/parts/r/part_ctype_tis620.result
new file mode 100644
index 00000000000..48a8a95f40e
--- /dev/null
+++ b/mysql-test/suite/parts/r/part_ctype_tis620.result
@@ -0,0 +1,47 @@
+#
+# MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+#
+CREATE TABLE t1 (
+a CHAR
+) COLLATE=tis620_thai_nopad_ci
+PARTITION BY RANGE COLUMNS (a)
+(
+PARTITION p0 VALUES LESS THAN (''),
+PARTITION p VALUES LESS THAN ('')
+);
+ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
+CREATE TABLE t1 (
+a CHAR
+) COLLATE=tis620_thai_nopad_ci
+PARTITION BY RANGE COLUMNS (a)
+(
+PARTITION p0 VALUES LESS THAN (''),
+PARTITION p VALUES LESS THAN (' ')
+);
+ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
+CREATE TABLE t1 (
+a CHAR
+) COLLATE=tis620_thai_nopad_ci
+PARTITION BY RANGE COLUMNS (a)
+(
+PARTITION p0 VALUES LESS THAN (' '),
+PARTITION p VALUES LESS THAN ('')
+);
+ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
+CREATE TABLE t1
+(
+id INT NOT NULL,
+data VARCHAR(2),
+KEY data_id (data(1),id)
+) COLLATE tis620_thai_nopad_ci ENGINE=MyISAM
+PARTITION BY RANGE (id)
+(
+PARTITION p10 VALUES LESS THAN (10),
+PARTITION p20 VALUES LESS THAN (20)
+);
+INSERT INTO t1 VALUES (4, 'ab'), (14, 'ab'), (19,''),(9,'') ;
+SELECT id FROM t1 WHERE data='' ORDER BY id;
+id
+9
+19
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/t/part_ctype_tis620.test b/mysql-test/suite/parts/t/part_ctype_tis620.test
new file mode 100644
index 00000000000..2e5bcd651b1
--- /dev/null
+++ b/mysql-test/suite/parts/t/part_ctype_tis620.test
@@ -0,0 +1,52 @@
+--source include/have_partition.inc
+--source include/have_tis620.inc
+
+--echo #
+--echo # MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
+--echo #
+
+--error ER_RANGE_NOT_INCREASING_ERROR
+CREATE TABLE t1 (
+ a CHAR
+) COLLATE=tis620_thai_nopad_ci
+PARTITION BY RANGE COLUMNS (a)
+(
+ PARTITION p0 VALUES LESS THAN (''),
+ PARTITION p VALUES LESS THAN ('')
+);
+
+--error ER_RANGE_NOT_INCREASING_ERROR
+CREATE TABLE t1 (
+ a CHAR
+) COLLATE=tis620_thai_nopad_ci
+PARTITION BY RANGE COLUMNS (a)
+(
+ PARTITION p0 VALUES LESS THAN (''),
+ PARTITION p VALUES LESS THAN (' ')
+);
+
+--error ER_RANGE_NOT_INCREASING_ERROR
+CREATE TABLE t1 (
+ a CHAR
+) COLLATE=tis620_thai_nopad_ci
+PARTITION BY RANGE COLUMNS (a)
+(
+ PARTITION p0 VALUES LESS THAN (' '),
+ PARTITION p VALUES LESS THAN ('')
+);
+
+
+CREATE TABLE t1
+(
+ id INT NOT NULL,
+ data VARCHAR(2),
+ KEY data_id (data(1),id)
+) COLLATE tis620_thai_nopad_ci ENGINE=MyISAM
+PARTITION BY RANGE (id)
+(
+ PARTITION p10 VALUES LESS THAN (10),
+ PARTITION p20 VALUES LESS THAN (20)
+);
+INSERT INTO t1 VALUES (4, 'ab'), (14, 'ab'), (19,''),(9,'') ;
+SELECT id FROM t1 WHERE data='' ORDER BY id;
+DROP TABLE t1;
diff --git a/mysql-test/suite/period/r/create.result b/mysql-test/suite/period/r/create.result
index dcae15c0772..e5fa2d1797d 100644
--- a/mysql-test/suite/period/r/create.result
+++ b/mysql-test/suite/period/r/create.result
@@ -100,3 +100,14 @@ show status like "Feature_application_time_periods";
Variable_name Value
Feature_application_time_periods 6
drop table t;
+# MDEV-29387: Period name with more than 32 symbols crashes the server
+#
+# test 34 symbols
+create table t2 (s date, e date,
+period for `abcd123456789012345678901234567890` (s,e));
+drop table t2;
+# test 64 symbols
+create table t2 (s date, e date, period for
+`abcd123456789012345678901234567890123456789012345678901234567890`
+ (s,e));
+drop table t2;
diff --git a/mysql-test/suite/period/r/delete.result b/mysql-test/suite/period/r/delete.result
index d8dae7b2a99..2b0a97e03d8 100644
--- a/mysql-test/suite/period/r/delete.result
+++ b/mysql-test/suite/period/r/delete.result
@@ -397,3 +397,27 @@ insert into t1 values (1,'2020-01-01','2020-02-20');
delete from t1 for portion of se from '2020-01-30' to '2020-01-31';
drop table t1;
# End of 10.5 tests
+#
+# MDEV-19190 Assertion `part_share->auto_inc_initialized` failed in
+# ha_partition::get_auto_increment
+#
+create table t1 (id int, s date, e date, period for app(s,e))
+partition by key(id);
+insert into t1 (s,e) values ('2023-07-21','2024-06-07');
+alter table t1 modify id int auto_increment key;
+delete from t1 for portion of app from '2023-07-20' to '2024-05-23';
+select * from t1;
+id s e
+2 2024-05-23 2024-06-07
+drop table t1;
+create table t1 (id int, s date, e date, period for app(s,e))
+partition by key(id);
+insert into t1 (s,e) values ('2023-07-21','2024-06-07');
+alter table t1 modify id int auto_increment key;
+delete from t1 for portion of app from '2023-07-20' to '2024-05-23';
+select * from t1;
+id s e
+2 2024-05-23 2024-06-07
+drop table t1;
+drop table log_tbl;
+drop procedure log;
diff --git a/mysql-test/suite/period/t/create.test b/mysql-test/suite/period/t/create.test
index 49dcc6ad3c7..0bca5b6df56 100644
--- a/mysql-test/suite/period/t/create.test
+++ b/mysql-test/suite/period/t/create.test
@@ -85,3 +85,17 @@ insert t values (2, '2001-01-01', '2001-01-01');
show status like "Feature_application_time_periods";
drop table t;
+
+--echo # MDEV-29387: Period name with more than 32 symbols crashes the server
+--echo #
+
+--echo # test 34 symbols
+create table t2 (s date, e date,
+ period for `abcd123456789012345678901234567890` (s,e));
+drop table t2;
+
+--echo # test 64 symbols
+create table t2 (s date, e date, period for
+ `abcd123456789012345678901234567890123456789012345678901234567890`
+ (s,e));
+drop table t2;
diff --git a/mysql-test/suite/period/t/delete.test b/mysql-test/suite/period/t/delete.test
index 3750e064ab9..676fa256f95 100644
--- a/mysql-test/suite/period/t/delete.test
+++ b/mysql-test/suite/period/t/delete.test
@@ -1,5 +1,6 @@
source suite/period/engines.inc;
source include/have_log_bin.inc;
+source include/have_partition.inc;
create table t (id int, s date, e date, period for apptime(s,e));
@@ -240,3 +241,30 @@ delete from t1 for portion of se from '2020-01-30' to '2020-01-31';
drop table t1;
--echo # End of 10.5 tests
+--echo #
+--echo # MDEV-19190 Assertion `part_share->auto_inc_initialized` failed in
+--echo # ha_partition::get_auto_increment
+--echo #
+create table t1 (id int, s date, e date, period for app(s,e))
+ partition by key(id);
+insert into t1 (s,e) values ('2023-07-21','2024-06-07');
+alter table t1 modify id int auto_increment key;
+delete from t1 for portion of app from '2023-07-20' to '2024-05-23';
+select * from t1;
+drop table t1;
+
+create table t1 (id int, s date, e date, period for app(s,e))
+ partition by key(id);
+insert into t1 (s,e) values ('2023-07-21','2024-06-07');
+alter table t1 modify id int auto_increment key;
+--let $trig_table=t1
+--let $trig_cols=id, s, e
+--disable_query_log
+--source suite/period/create_triggers.inc
+--enable_query_log
+
+delete from t1 for portion of app from '2023-07-20' to '2024-05-23';
+select * from t1;
+drop table t1;
+drop table log_tbl;
+drop procedure log;
diff --git a/mysql-test/suite/sysschema/disabled.def b/mysql-test/suite/sysschema/disabled.def
new file mode 100644
index 00000000000..62df96a4663
--- /dev/null
+++ b/mysql-test/suite/sysschema/disabled.def
@@ -0,0 +1,12 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+pr_statement_performance_analyzer : MDEV-29822 perfschema specific and Windows specific problems.