summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/have_log_bin.inc7
-rw-r--r--mysql-test/include/have_log_bin.require2
-rw-r--r--mysql-test/main/alter_table_lock.result2
-rw-r--r--mysql-test/main/alter_table_lock.test4
-rw-r--r--mysql-test/main/insert.result8
-rw-r--r--mysql-test/main/insert.test10
-rw-r--r--mysql-test/main/mysql_install_db_win.test7
-rw-r--r--mysql-test/main/opt_trace.result106
-rw-r--r--mysql-test/main/opt_trace_index_merge.result3
-rw-r--r--mysql-test/main/opt_trace_index_merge_innodb.result2
-rw-r--r--mysql-test/main/opt_trace_security.result6
-rw-r--r--mysql-test/main/subselect_sj2.result6
-rw-r--r--mysql-test/main/subselect_sj2_jcl6.result6
-rw-r--r--mysql-test/main/subselect_sj2_mat.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_truncate_active_log.result87
-rw-r--r--mysql-test/suite/binlog/r/binlog_truncate_multi_log.result8
-rw-r--r--mysql-test/suite/binlog/t/binlog_truncate_active_log.inc15
-rw-r--r--mysql-test/suite/binlog/t/binlog_truncate_active_log.test9
-rw-r--r--mysql-test/suite/binlog/t/binlog_truncate_multi_log.test12
-rw-r--r--mysql-test/suite/compat/oracle/r/events.result9
-rw-r--r--mysql-test/suite/compat/oracle/r/sp.result13
-rw-r--r--mysql-test/suite/compat/oracle/t/events.test10
-rw-r--r--mysql-test/suite/compat/oracle/t/sp.test16
-rw-r--r--mysql-test/suite/galera/disabled.def2
-rw-r--r--mysql-test/suite/galera/r/MDEV-28053.result14
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result88
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff190
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28423.result519
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff190
-rw-r--r--mysql-test/suite/galera/r/galera_ist_MDEV-28583.result519
-rw-r--r--mysql-test/suite/galera/r/galera_many_tables_nopk.result6
-rw-r--r--mysql-test/suite/galera/r/galera_read_only.result12
-rw-r--r--mysql-test/suite/galera/t/MDEV-28053.cnf6
-rw-r--r--mysql-test/suite/galera/t/MDEV-28053.test61
-rw-r--r--mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test73
-rw-r--r--mysql-test/suite/galera/t/galera_ist_MDEV-28423.cnf44
-rw-r--r--mysql-test/suite/galera/t/galera_ist_MDEV-28423.test18
-rw-r--r--mysql-test/suite/galera/t/galera_ist_MDEV-28583.cnf44
-rw-r--r--mysql-test/suite/galera/t/galera_ist_MDEV-28583.test18
-rw-r--r--mysql-test/suite/galera/t/galera_many_tables_nopk.test23
-rw-r--r--mysql-test/suite/galera/t/galera_read_only.test13
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test5
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result2
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test2
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_status_variables.result3
-rw-r--r--mysql-test/suite/innodb/r/monitor.result2
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup.test16
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.result18
-rw-r--r--mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.test35
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_glle_no_terminate.result46
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test72
-rw-r--r--mysql-test/suite/sys_vars/r/group_concat_max_len_func.result54
-rw-r--r--mysql-test/suite/sys_vars/t/group_concat_max_len_func.test31
-rw-r--r--mysql-test/suite/sysschema/r/pr_create_synonym_db.result14
-rw-r--r--mysql-test/suite/sysschema/t/pr_create_synonym_db.test17
-rw-r--r--mysql-test/suite/versioning/r/partition.result12
-rw-r--r--mysql-test/suite/versioning/t/partition.test17
60 files changed, 2338 insertions, 207 deletions
diff --git a/mysql-test/include/have_log_bin.inc b/mysql-test/include/have_log_bin.inc
index eb2529dae3b..fd5dc66e416 100644
--- a/mysql-test/include/have_log_bin.inc
+++ b/mysql-test/include/have_log_bin.inc
@@ -8,7 +8,6 @@
source include/not_embedded.inc;
--- require include/have_log_bin.require
-disable_query_log;
-show variables like 'log_bin';
-enable_query_log;
+if (`select not @@log_bin`) {
+ skip Test requires: 'have_log_bin';
+}
diff --git a/mysql-test/include/have_log_bin.require b/mysql-test/include/have_log_bin.require
deleted file mode 100644
index d4fd77e4f8d..00000000000
--- a/mysql-test/include/have_log_bin.require
+++ /dev/null
@@ -1,2 +0,0 @@
-Variable_name Value
-log_bin ON
diff --git a/mysql-test/main/alter_table_lock.result b/mysql-test/main/alter_table_lock.result
index ce6097c9ada..620fca23315 100644
--- a/mysql-test/main/alter_table_lock.result
+++ b/mysql-test/main/alter_table_lock.result
@@ -11,8 +11,6 @@ ERROR 42S02: Table 'test.x' doesn't exist
SET SESSION max_session_mem_used= 8192;
LOCK TABLE t1 WRITE;
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
-Warnings:
-Note 1054 Unknown column 'b' in 't1'
SET SESSION max_session_mem_used = @max_session_mem_used_save;
UNLOCK TABLES;
DROP TABLE t1;
diff --git a/mysql-test/main/alter_table_lock.test b/mysql-test/main/alter_table_lock.test
index f1f60e38b61..bd26c1ac7d0 100644
--- a/mysql-test/main/alter_table_lock.test
+++ b/mysql-test/main/alter_table_lock.test
@@ -14,9 +14,13 @@ SELECT * FROM t1;
ALTER TABLE x MODIFY xx INT;
SET SESSION max_session_mem_used= 8192;
+--error 0,ER_OPTION_PREVENTS_STATEMENT
LOCK TABLE t1 WRITE;
+--disable_warnings
+--error 0,ER_OPTION_PREVENTS_STATEMENT
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
+--enable_warnings
SET SESSION max_session_mem_used = @max_session_mem_used_save;
UNLOCK TABLES;
diff --git a/mysql-test/main/insert.result b/mysql-test/main/insert.result
index 674223c17a4..22682e180c6 100644
--- a/mysql-test/main/insert.result
+++ b/mysql-test/main/insert.result
@@ -776,6 +776,14 @@ select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
ERROR 42S22: Unknown column 't1.a' in 'on clause'
drop table t;
#
+# MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
+#
+create table t1 (i int) ;
+create table t2 (j int) ;
+create table t4 select * from t1 join t2 on (select t3.i);
+ERROR 42S22: Unknown column 't3.i' in 'field list'
+drop table t1, t2;
+#
# End of 10.4 tests
#
#
diff --git a/mysql-test/main/insert.test b/mysql-test/main/insert.test
index 44da0d860f2..e5cb2bac6f8 100644
--- a/mysql-test/main/insert.test
+++ b/mysql-test/main/insert.test
@@ -641,6 +641,15 @@ select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
drop table t;
--echo #
+--echo # MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
+--echo #
+create table t1 (i int) ;
+create table t2 (j int) ;
+--error ER_BAD_FIELD_ERROR
+create table t4 select * from t1 join t2 on (select t3.i);
+drop table t1, t2;
+
+--echo #
--echo # End of 10.4 tests
--echo #
@@ -660,4 +669,3 @@ drop table t1;
--echo #
--echo # End of 10.5 tests
--echo #
-
diff --git a/mysql-test/main/mysql_install_db_win.test b/mysql-test/main/mysql_install_db_win.test
index ceb7293f611..c400dbf3fb9 100644
--- a/mysql-test/main/mysql_install_db_win.test
+++ b/mysql-test/main/mysql_install_db_win.test
@@ -42,6 +42,13 @@ remove_file $log;
rmdir $ddir;
+# MDEV-28471 - mysql_install_db.exe fails with --innodb-page-size=64K
+--disable_result_log
+exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R --innodb-page-size=64K --verbose
+--enable_result_log
+rmdir $ddir;
+
+# Tests with config file
let $restart_parameters=;
connection default;
diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result
index d3021a2b395..80ada15244a 100644
--- a/mysql-test/main/opt_trace.result
+++ b/mysql-test/main/opt_trace.result
@@ -145,8 +145,7 @@ select * from v1 {
}
},
"rows_for_plan": 1,
- "cost_for_plan": 2.404394531,
- "estimated_join_cardinality": 1
+ "cost_for_plan": 2.404394531
}
]
},
@@ -296,8 +295,7 @@ select * from (select * from t1 where t1.a=1)q {
}
},
"rows_for_plan": 1,
- "cost_for_plan": 2.404394531,
- "estimated_join_cardinality": 1
+ "cost_for_plan": 2.404394531
}
]
},
@@ -454,8 +452,7 @@ select * from v2 {
},
"rows_for_plan": 1,
"cost_for_plan": 2.404394531,
- "cost_for_sorting": 1,
- "estimated_join_cardinality": 1
+ "cost_for_sorting": 1
}
]
},
@@ -525,8 +522,7 @@ select * from v2 {
}
},
"rows_for_plan": 2,
- "cost_for_plan": 2.4,
- "estimated_join_cardinality": 2
+ "cost_for_plan": 2.4
}
]
},
@@ -662,8 +658,7 @@ explain select * from v2 {
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.021972656,
- "estimated_join_cardinality": 10
+ "cost_for_plan": 4.021972656
}
]
},
@@ -780,8 +775,7 @@ explain select * from v1 {
},
"rows_for_plan": 10,
"cost_for_plan": 4.021972656,
- "cost_for_sorting": 10,
- "estimated_join_cardinality": 10
+ "cost_for_sorting": 10
}
]
},
@@ -845,8 +839,7 @@ explain select * from v1 {
}
},
"rows_for_plan": 10,
- "cost_for_plan": 12,
- "estimated_join_cardinality": 10
+ "cost_for_plan": 12
}
]
},
@@ -1047,7 +1040,7 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b {
},
"rows_for_plan": 100,
"cost_for_plan": 242.3759623,
- "estimated_join_cardinality": 100
+ "pruned_by_hanging_leaf": true
}
]
},
@@ -1278,8 +1271,7 @@ EXPLAIN SELECT DISTINCT a FROM t1 {
}
},
"rows_for_plan": 5,
- "cost_for_plan": 7.25,
- "estimated_join_cardinality": 5
+ "cost_for_plan": 7.25
}
]
},
@@ -1470,8 +1462,7 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
},
"rows_for_plan": 8,
"cost_for_plan": 3.8,
- "cost_for_sorting": 8,
- "estimated_join_cardinality": 8
+ "cost_for_sorting": 8
}
]
},
@@ -1669,8 +1660,7 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
},
"rows_for_plan": 9,
"cost_for_plan": 4.15,
- "cost_for_sorting": 9,
- "estimated_join_cardinality": 9
+ "cost_for_sorting": 9
}
]
},
@@ -1857,8 +1847,7 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id {
},
"rows_for_plan": 9,
"cost_for_plan": 4.15,
- "cost_for_sorting": 9,
- "estimated_join_cardinality": 9
+ "cost_for_sorting": 9
}
]
},
@@ -2140,8 +2129,7 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 {
}
},
"rows_for_plan": 21,
- "cost_for_plan": 25.34242739,
- "estimated_join_cardinality": 21
+ "cost_for_plan": 25.34242739
}
]
},
@@ -2394,8 +2382,7 @@ select t1.a from t1 left join t2 on t1.a=t2.a {
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.806835937,
- "estimated_join_cardinality": 4
+ "cost_for_plan": 2.806835937
}
]
},
@@ -2563,7 +2550,7 @@ explain select * from t1 left join t2 on t2.a=t1.a {
},
"rows_for_plan": 4,
"cost_for_plan": 7.606835937,
- "estimated_join_cardinality": 4
+ "pruned_by_hanging_leaf": true
}
]
}
@@ -2742,8 +2729,7 @@ explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.806835937,
- "estimated_join_cardinality": 4
+ "cost_for_plan": 2.806835937
}
]
},
@@ -2950,8 +2936,7 @@ explain extended select * from t1 where a in (select pk from t10) {
}
},
"rows_for_plan": 10,
- "cost_for_plan": 4.021972656,
- "estimated_join_cardinality": 10
+ "cost_for_plan": 4.021972656
}
]
}
@@ -3023,8 +3008,7 @@ explain extended select * from t1 where a in (select pk from t10) {
{
"chosen_strategy": "SJ-Materialization"
}
- ],
- "estimated_join_cardinality": 3
+ ]
}
]
},
@@ -3429,7 +3413,7 @@ explain select * from t1 where pk = 2 and a=5 and b=1 {
},
"rows_for_plan": 1,
"cost_for_plan": 0.326073957,
- "estimated_join_cardinality": 1
+ "pruned_by_hanging_leaf": true
}
]
},
@@ -3557,8 +3541,7 @@ select f1(a) from t1 {
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.806835937,
- "estimated_join_cardinality": 4
+ "cost_for_plan": 2.806835937
}
]
},
@@ -3654,8 +3637,7 @@ select f2(a) from t1 {
}
},
"rows_for_plan": 4,
- "cost_for_plan": 2.806835937,
- "estimated_join_cardinality": 4
+ "cost_for_plan": 2.806835937
}
]
},
@@ -3701,7 +3683,7 @@ a
2
select length(trace) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
length(trace)
-2141
+2092
set optimizer_trace_max_mem_size=100;
select * from t1;
a
@@ -3715,7 +3697,7 @@ select * from t1 {
"join_preparation": {
"select_id": 1,
"steps": [
- 2041 0
+ 1992 0
set optimizer_trace_max_mem_size=0;
select * from t1;
a
@@ -3723,7 +3705,7 @@ a
2
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES
-select * from t1 2141 0
+select * from t1 2092 0
drop table t1;
set optimizer_trace='enabled=off';
set @@optimizer_trace_max_mem_size= @save_optimizer_trace_max_mem_size;
@@ -4066,7 +4048,7 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 {
},
"rows_for_plan": 3,
"cost_for_plan": 4.948514767,
- "estimated_join_cardinality": 3
+ "pruned_by_hanging_leaf": true
}
]
},
@@ -4265,8 +4247,7 @@ explain select * from (select rand() from t1)q {
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.605126953,
- "estimated_join_cardinality": 3
+ "cost_for_plan": 2.605126953
}
]
},
@@ -4330,8 +4311,7 @@ explain select * from (select rand() from t1)q {
}
},
"rows_for_plan": 3,
- "cost_for_plan": 3.6,
- "estimated_join_cardinality": 3
+ "cost_for_plan": 3.6
}
]
},
@@ -4559,8 +4539,7 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
}
},
"rows_for_plan": 9,
- "cost_for_plan": 6.410253906,
- "estimated_join_cardinality": 9
+ "cost_for_plan": 6.410253906
}
]
},
@@ -4680,8 +4659,7 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_
{
"chosen_strategy": "SJ-Materialization"
}
- ],
- "estimated_join_cardinality": 3
+ ]
}
]
},
@@ -5224,8 +5202,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"chosen_strategy": "DuplicateWeedout"
}
- ],
- "estimated_join_cardinality": 27
+ ]
}
]
},
@@ -5347,8 +5324,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"chosen_strategy": "DuplicateWeedout"
}
- ],
- "estimated_join_cardinality": 27
+ ]
}
]
},
@@ -6669,8 +6645,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.02050781,
- "estimated_join_cardinality": 27
+ "cost_for_plan": 10.02050781
}
]
},
@@ -6743,8 +6718,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
}
},
"rows_for_plan": 27,
- "cost_for_plan": 10.02050781,
- "estimated_join_cardinality": 27
+ "cost_for_plan": 10.02050781
}
]
},
@@ -6963,8 +6937,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
{
"chosen_strategy": "SJ-Materialization"
}
- ],
- "estimated_join_cardinality": 27
+ ]
}
]
},
@@ -8130,8 +8103,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
}
},
"rows_for_plan": 4000,
- "cost_for_plan": 1025.003418,
- "estimated_join_cardinality": 4000
+ "cost_for_plan": 1025.003418
}
]
},
@@ -8472,7 +8444,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans'))
"rows_for_plan": 10,
"cost_for_plan": 26.0278306,
"cost_for_sorting": 10,
- "estimated_join_cardinality": 10
+ "pruned_by_hanging_leaf": true
}
]
},
@@ -8792,8 +8764,7 @@ select count(*) from seq_1_to_10000000 {
}
},
"rows_for_plan": 10000000,
- "cost_for_plan": 12000000,
- "estimated_join_cardinality": 10000000
+ "cost_for_plan": 12000000
}
]
},
@@ -9197,8 +9168,7 @@ json_detailed(json_extract(trace, '$**.choose_best_splitting'))
},
"rows_for_plan": 1.8367,
"cost_for_plan": 2.367925794,
- "cost_for_sorting": 1.8367,
- "estimated_join_cardinality": 1.8367
+ "cost_for_sorting": 1.8367
}
]
},
diff --git a/mysql-test/main/opt_trace_index_merge.result b/mysql-test/main/opt_trace_index_merge.result
index f1e13586eda..335e408bddd 100644
--- a/mysql-test/main/opt_trace_index_merge.result
+++ b/mysql-test/main/opt_trace_index_merge.result
@@ -221,8 +221,7 @@ explain select * from t1 where a=1 or b=1 {
}
},
"rows_for_plan": 2,
- "cost_for_plan": 2.884903732,
- "estimated_join_cardinality": 2
+ "cost_for_plan": 2.884903732
}
]
},
diff --git a/mysql-test/main/opt_trace_index_merge_innodb.result b/mysql-test/main/opt_trace_index_merge_innodb.result
index fbc7faa0d04..b9c59c7a100 100644
--- a/mysql-test/main/opt_trace_index_merge_innodb.result
+++ b/mysql-test/main/opt_trace_index_merge_innodb.result
@@ -227,7 +227,7 @@ explain select * from t1 where pk1 != 0 and key1 = 1 {
},
"rows_for_plan": 1,
"cost_for_plan": 1.325146475,
- "estimated_join_cardinality": 1
+ "pruned_by_hanging_leaf": true
}
]
},
diff --git a/mysql-test/main/opt_trace_security.result b/mysql-test/main/opt_trace_security.result
index e1937e744a4..83d98c4c183 100644
--- a/mysql-test/main/opt_trace_security.result
+++ b/mysql-test/main/opt_trace_security.result
@@ -107,8 +107,7 @@ select * from db1.t1 {
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.605126953,
- "estimated_join_cardinality": 3
+ "cost_for_plan": 2.605126953
}
]
},
@@ -229,8 +228,7 @@ select * from db1.v1 {
}
},
"rows_for_plan": 3,
- "cost_for_plan": 2.605126953,
- "estimated_join_cardinality": 3
+ "cost_for_plan": 2.605126953
}
]
},
diff --git a/mysql-test/main/subselect_sj2.result b/mysql-test/main/subselect_sj2.result
index 2d0df9a05d0..cdf9707dcbd 100644
--- a/mysql-test/main/subselect_sj2.result
+++ b/mysql-test/main/subselect_sj2.result
@@ -466,11 +466,11 @@ where t0.a in ( select t1.a from t1,t2 where t2.a=t0.a and
t1.b=t2.b);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 5 100.00 Using where
-1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00
-1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using where; FirstMatch(t2)
+1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Start temporary
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary
Warnings:
Note 1276 Field or reference 'test.t0.a' of SELECT #2 was resolved in SELECT #1
-Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where `test`.`t2`.`a` = `test`.`t0`.`a` and `test`.`t1`.`a` = `test`.`t0`.`a` and `test`.`t1`.`b` = `test`.`t2`.`b`
+Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where `test`.`t1`.`a` = `test`.`t0`.`a` and `test`.`t2`.`a` = `test`.`t0`.`a` and `test`.`t2`.`b` = `test`.`t1`.`b`
update t1 set a=3, b=11 where a=4;
update t2 set b=11 where a=3;
select * from t0 where t0.a in
diff --git a/mysql-test/main/subselect_sj2_jcl6.result b/mysql-test/main/subselect_sj2_jcl6.result
index f0e8e9b4881..84317467e8a 100644
--- a/mysql-test/main/subselect_sj2_jcl6.result
+++ b/mysql-test/main/subselect_sj2_jcl6.result
@@ -477,11 +477,11 @@ where t0.a in ( select t1.a from t1,t2 where t2.a=t0.a and
t1.b=t2.b);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 5 100.00 Using where
-1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using where; FirstMatch(t2); Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Start temporary; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
Warnings:
Note 1276 Field or reference 'test.t0.a' of SELECT #2 was resolved in SELECT #1
-Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where `test`.`t2`.`a` = `test`.`t0`.`a` and `test`.`t1`.`a` = `test`.`t0`.`a` and `test`.`t1`.`b` = `test`.`t2`.`b`
+Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where `test`.`t1`.`a` = `test`.`t0`.`a` and `test`.`t2`.`a` = `test`.`t0`.`a` and `test`.`t2`.`b` = `test`.`t1`.`b`
update t1 set a=3, b=11 where a=4;
update t2 set b=11 where a=3;
# Not anymore:
diff --git a/mysql-test/main/subselect_sj2_mat.result b/mysql-test/main/subselect_sj2_mat.result
index 9b497ade58b..54286f1fa82 100644
--- a/mysql-test/main/subselect_sj2_mat.result
+++ b/mysql-test/main/subselect_sj2_mat.result
@@ -468,11 +468,11 @@ where t0.a in ( select t1.a from t1,t2 where t2.a=t0.a and
t1.b=t2.b);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 5 100.00 Using where
-1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00
-1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using where; FirstMatch(t2)
+1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Start temporary
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary
Warnings:
Note 1276 Field or reference 'test.t0.a' of SELECT #2 was resolved in SELECT #1
-Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where `test`.`t2`.`a` = `test`.`t0`.`a` and `test`.`t1`.`a` = `test`.`t0`.`a` and `test`.`t1`.`b` = `test`.`t2`.`b`
+Note 1003 select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where `test`.`t1`.`a` = `test`.`t0`.`a` and `test`.`t2`.`a` = `test`.`t0`.`a` and `test`.`t2`.`b` = `test`.`t1`.`b`
update t1 set a=3, b=11 where a=4;
update t2 set b=11 where a=3;
select * from t0 where t0.a in
diff --git a/mysql-test/suite/binlog/r/binlog_truncate_active_log.result b/mysql-test/suite/binlog/r/binlog_truncate_active_log.result
index e76c3c3911b..85d37534c0b 100644
--- a/mysql-test/suite/binlog/r/binlog_truncate_active_log.result
+++ b/mysql-test/suite/binlog/r/binlog_truncate_active_log.result
@@ -4,11 +4,13 @@ RESET MASTER;
SET @@global.sync_binlog=1;
CREATE TABLE t (f INT) ENGINE=INNODB;
CREATE TABLE t2 (f INT) ENGINE=INNODB;
+CREATE TABLE t4 (f INT) ENGINE=INNODB;
CREATE TABLE tm (f INT) ENGINE=Aria;
# Case A.
connect master1,localhost,root,,;
connect master2,localhost,root,,;
connect master3,localhost,root,,;
+connect master4,localhost,root,,;
connection default;
INSERT INTO t VALUES (10);
INSERT INTO tm VALUES (10);
@@ -23,14 +25,23 @@ connection master3;
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
SELECT @@global.gtid_binlog_pos as 'Before the crash';
Before the crash
-0-1-7
+0-1-8
+connection master4;
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master4_ready WAIT_FOR signal_never_arrives";
+INSERT INTO t4 VALUES (13);
+connection master3;
+SET DEBUG_SYNC= "now WAIT_FOR master4_ready";
+SELECT @@global.gtid_binlog_pos as 'Before the crash and never logged trx';
+Before the crash and never logged trx
+0-1-8
connection default;
# Kill the server
disconnect master1;
disconnect master2;
disconnect master3;
-# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
-FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-6/ in mysqld.1.err
+disconnect master4;
+# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
+FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-7/ in mysqld.1.err
Pre-crash binlog file content:
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -39,6 +50,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t (f INT) ENGINE=INNODB
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (f INT) ENGINE=INNODB
master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (f INT) ENGINE=INNODB
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE tm (f INT) ENGINE=Aria
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (10)
@@ -48,16 +61,20 @@ master-bin.000001 # Query # # use `test`; INSERT INTO tm VALUES (10)
master-bin.000001 # Query # # COMMIT
SELECT @@global.gtid_binlog_pos as 'After the crash';
After the crash
-0-1-5
+0-1-6
"One row should be present in table 't'"
SELECT * FROM t;
f
10
+"No row should be present in table 't4'"
+SELECT * FROM t4;
+f
DELETE FROM t;
# Case B.
connect master1,localhost,root,,;
connect master2,localhost,root,,;
connect master3,localhost,root,,;
+connect master4,localhost,root,,;
connection default;
INSERT INTO t VALUES (10);
INSERT INTO tm VALUES (10);
@@ -72,14 +89,23 @@ connection master3;
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
SELECT @@global.gtid_binlog_pos as 'Before the crash';
Before the crash
-0-1-10
+0-1-11
+connection master4;
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master4_ready WAIT_FOR signal_never_arrives";
+INSERT INTO t4 VALUES (13);
+connection master3;
+SET DEBUG_SYNC= "now WAIT_FOR master4_ready";
+SELECT @@global.gtid_binlog_pos as 'Before the crash and never logged trx';
+Before the crash and never logged trx
+0-1-11
connection default;
# Kill the server
disconnect master1;
disconnect master2;
disconnect master3;
-# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
-FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-10/ in mysqld.1.err
+disconnect master4;
+# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
+FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-11/ in mysqld.1.err
Pre-crash binlog file content:
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -97,11 +123,14 @@ master-bin.000002 # Query # # use `test`; DELETE FROM t2 WHERE f = 0
master-bin.000002 # Query # # COMMIT
SELECT @@global.gtid_binlog_pos as 'After the crash';
After the crash
-0-1-9
+0-1-10
"One row should be present in table 't'"
SELECT * FROM t;
f
10
+"No row should be present in table 't4'"
+SELECT * FROM t4;
+f
DELETE FROM t;
# Case C.
CREATE PROCEDURE sp_blank_xa()
@@ -114,6 +143,7 @@ END|
connect master1,localhost,root,,;
connect master2,localhost,root,,;
connect master3,localhost,root,,;
+connect master4,localhost,root,,;
connection default;
INSERT INTO t VALUES (10);
INSERT INTO tm VALUES (10);
@@ -128,14 +158,23 @@ connection master3;
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
SELECT @@global.gtid_binlog_pos as 'Before the crash';
Before the crash
-0-1-15
+0-1-16
+connection master4;
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master4_ready WAIT_FOR signal_never_arrives";
+INSERT INTO t4 VALUES (13);
+connection master3;
+SET DEBUG_SYNC= "now WAIT_FOR master4_ready";
+SELECT @@global.gtid_binlog_pos as 'Before the crash and never logged trx';
+Before the crash and never logged trx
+0-1-16
connection default;
# Kill the server
disconnect master1;
disconnect master2;
disconnect master3;
-# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
-FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-14/ in mysqld.1.err
+disconnect master4;
+# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
+FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-15/ in mysqld.1.err
Pre-crash binlog file content:
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -158,11 +197,14 @@ master-bin.000003 # Query # # use `test`; INSERT INTO tm VALUES (10)
master-bin.000003 # Query # # COMMIT
SELECT @@global.gtid_binlog_pos as 'After the crash';
After the crash
-0-1-13
+0-1-14
"One row should be present in table 't'"
SELECT * FROM t;
f
10
+"No row should be present in table 't4'"
+SELECT * FROM t4;
+f
DELETE FROM t;
DROP PROCEDURE sp_blank_xa;
# Case D.
@@ -176,6 +218,7 @@ END|
connect master1,localhost,root,,;
connect master2,localhost,root,,;
connect master3,localhost,root,,;
+connect master4,localhost,root,,;
connection default;
INSERT INTO t VALUES (10);
INSERT INTO tm VALUES (10);
@@ -190,14 +233,23 @@ connection master3;
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
SELECT @@global.gtid_binlog_pos as 'Before the crash';
Before the crash
-0-1-20
+0-1-21
+connection master4;
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master4_ready WAIT_FOR signal_never_arrives";
+INSERT INTO t4 VALUES (13);
+connection master3;
+SET DEBUG_SYNC= "now WAIT_FOR master4_ready";
+SELECT @@global.gtid_binlog_pos as 'Before the crash and never logged trx';
+Before the crash and never logged trx
+0-1-21
connection default;
# Kill the server
disconnect master1;
disconnect master2;
disconnect master3;
-# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
-FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-20/ in mysqld.1.err
+disconnect master4;
+# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
+FOUND 1 /Successfully truncated.*to remove transactions starting from GTID 0-1-21/ in mysqld.1.err
Pre-crash binlog file content:
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -226,11 +278,14 @@ master-bin.000004 # Query # # XA END X'786964',X'',1
master-bin.000004 # XA_prepare # # XA PREPARE X'786964',X'',1
SELECT @@global.gtid_binlog_pos as 'After the crash';
After the crash
-0-1-19
+0-1-20
"One row should be present in table 't'"
SELECT * FROM t;
f
10
+"No row should be present in table 't4'"
+SELECT * FROM t4;
+f
DELETE FROM t;
DROP PROCEDURE sp_xa;
# Cleanup
diff --git a/mysql-test/suite/binlog/r/binlog_truncate_multi_log.result b/mysql-test/suite/binlog/r/binlog_truncate_multi_log.result
index ae292c04c32..271e3c50b19 100644
--- a/mysql-test/suite/binlog/r/binlog_truncate_multi_log.result
+++ b/mysql-test/suite/binlog/r/binlog_truncate_multi_log.result
@@ -22,6 +22,11 @@ SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT
INSERT INTO ti VALUES (3, "not gonna survive");
connection default;
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
+connect master3,localhost,root,,;
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master3_ready WAIT_FOR master3_go_never_arrives";
+INSERT INTO ti VALUES (4, "not gonna be log therefore survive"),(5, "ditto");
+connection default;
+SET DEBUG_SYNC= "now WAIT_FOR master3_ready";
"List of binary logs before crash"
show binary logs;
Log_name File_size
@@ -36,7 +41,8 @@ connection default;
# Kill the server
disconnect master1;
disconnect master2;
-# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
+disconnect master3;
+# restart: --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
FOUND 1 /truncated binlog file:.*master.*000002/ in mysqld.1.err
"One record should be present in table"
SELECT * FROM ti;
diff --git a/mysql-test/suite/binlog/t/binlog_truncate_active_log.inc b/mysql-test/suite/binlog/t/binlog_truncate_active_log.inc
index 75a8310c220..68ac752725e 100644
--- a/mysql-test/suite/binlog/t/binlog_truncate_active_log.inc
+++ b/mysql-test/suite/binlog/t/binlog_truncate_active_log.inc
@@ -1,6 +1,7 @@
connect(master1,localhost,root,,);
connect(master2,localhost,root,,);
connect(master3,localhost,root,,);
+connect(master4,localhost,root,,);
--connection default
@@ -22,16 +23,26 @@ SET DEBUG_SYNC= "commit_before_get_LOCK_after_binlog_sync SIGNAL master2_ready";
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
SELECT @@global.gtid_binlog_pos as 'Before the crash';
+--connection master4
+# Simulate prepared & not-logged trx; it will never recover.
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master4_ready WAIT_FOR signal_never_arrives";
+--send INSERT INTO t4 VALUES (13)
+
+--connection master3
+SET DEBUG_SYNC= "now WAIT_FOR master4_ready";
+SELECT @@global.gtid_binlog_pos as 'Before the crash and never logged trx';
+
--connection default
--source include/kill_mysqld.inc
--disconnect master1
--disconnect master2
--disconnect master3
+--disconnect master4
#
# Server restart
#
---let $restart_parameters= --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
+--let $restart_parameters= --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
--source include/start_mysqld.inc
# Check error log for a successful truncate message.
@@ -49,6 +60,8 @@ SELECT @@global.gtid_binlog_pos as 'Before the crash';
SELECT @@global.gtid_binlog_pos as 'After the crash';
--echo "One row should be present in table 't'"
SELECT * FROM t;
+--echo "No row should be present in table 't4'"
+SELECT * FROM t4;
# prepare binlog file index for the next test
--inc $binlog_file_index
diff --git a/mysql-test/suite/binlog/t/binlog_truncate_active_log.test b/mysql-test/suite/binlog/t/binlog_truncate_active_log.test
index 920679e99e9..7c63a853da6 100644
--- a/mysql-test/suite/binlog/t/binlog_truncate_active_log.test
+++ b/mysql-test/suite/binlog/t/binlog_truncate_active_log.test
@@ -25,6 +25,7 @@ RESET MASTER;
SET @@global.sync_binlog=1;
CREATE TABLE t (f INT) ENGINE=INNODB;
CREATE TABLE t2 (f INT) ENGINE=INNODB;
+CREATE TABLE t4 (f INT) ENGINE=INNODB;
CREATE TABLE tm (f INT) ENGINE=Aria;
# Old (pre-crash) binlog file index initial value.
@@ -42,14 +43,14 @@ CREATE TABLE tm (f INT) ENGINE=Aria;
# 'query1' onwards will be removed from the binary log.
# Show-binlog-events is to prove that.
---let $truncate_gtid_pos = 0-1-6
+--let $truncate_gtid_pos = 0-1-7
--let $query1 = INSERT INTO t VALUES (20)
--let $query2 = DELETE FROM t2 WHERE f = 0 /* no such record */
--source binlog_truncate_active_log.inc
--echo # Case B.
# The inverted sequence ends up to truncate starting from $query2
---let $truncate_gtid_pos = 0-1-10
+--let $truncate_gtid_pos = 0-1-11
--let $query1 = DELETE FROM t2 WHERE f = 0
--let $query2 = INSERT INTO t VALUES (20)
--source binlog_truncate_active_log.inc
@@ -68,7 +69,7 @@ delimiter ;|
# The same as in A with $query2 being the zero-engine XA transaction.
# Both $query1 and $query2 are going to be truncated.
---let $truncate_gtid_pos = 0-1-14
+--let $truncate_gtid_pos = 0-1-15
--let $query1 = INSERT INTO t VALUES (20)
--let $query2 = CALL sp_blank_xa
--source binlog_truncate_active_log.inc
@@ -89,7 +90,7 @@ delimiter ;|
# The same as in B with $query1 being the prepared XA transaction.
# Truncation must occurs at $query2.
---let $truncate_gtid_pos = 0-1-20
+--let $truncate_gtid_pos = 0-1-21
--let $query1 = CALL sp_xa
--let $query2 = INSERT INTO t2 VALUES (20)
--source binlog_truncate_active_log.inc
diff --git a/mysql-test/suite/binlog/t/binlog_truncate_multi_log.test b/mysql-test/suite/binlog/t/binlog_truncate_multi_log.test
index a7068885871..079c79b2984 100644
--- a/mysql-test/suite/binlog/t/binlog_truncate_multi_log.test
+++ b/mysql-test/suite/binlog/t/binlog_truncate_multi_log.test
@@ -40,6 +40,15 @@ SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL master2_ready WAIT
--connection default
SET DEBUG_SYNC= "now WAIT_FOR master2_ready";
+
+connect(master3,localhost,root,,);
+# The 3nd trx for recovery, it won't get into binlog nor therefore recover
+SET DEBUG_SYNC= "ha_commit_trans_before_log_and_order SIGNAL master3_ready WAIT_FOR master3_go_never_arrives";
+--send INSERT INTO ti VALUES (4, "not gonna be log therefore survive"),(5, "ditto")
+
+--connection default
+SET DEBUG_SYNC= "now WAIT_FOR master3_ready";
+
--echo "List of binary logs before crash"
--source include/show_binary_logs.inc
--echo # The gtid binlog state prior the crash will be truncated at the end of the test
@@ -49,11 +58,12 @@ SELECT @@global.gtid_binlog_state;
--source include/kill_mysqld.inc
--disconnect master1
--disconnect master2
+--disconnect master3
#
# Server restart
#
---let $restart_parameters= --rpl-semi-sync-slave-enabled=1 --sync-binlog=1
+--let $restart_parameters= --rpl-semi-sync-slave-enabled=1 --sync-binlog=1 --log-warnings=3
--source include/start_mysqld.inc
# Check error log for a successful truncate message.
diff --git a/mysql-test/suite/compat/oracle/r/events.result b/mysql-test/suite/compat/oracle/r/events.result
index ef9c50115ae..1f62e2e5ee2 100644
--- a/mysql-test/suite/compat/oracle/r/events.result
+++ b/mysql-test/suite/compat/oracle/r/events.result
@@ -16,3 +16,12 @@ COUNT(*)
1
DROP TABLE t1;
SET GLOBAL event_scheduler=off;
+#
+# MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
+#
+CREATE EVENT ev ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGIN END;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
+SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='test' AND EVENT_NAME='ev';
+EVENT_DEFINITION BEGIN END
+DROP EVENT ev;
diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result
index a9a97769333..44092c0be30 100644
--- a/mysql-test/suite/compat/oracle/r/sp.result
+++ b/mysql-test/suite/compat/oracle/r/sp.result
@@ -2549,7 +2549,18 @@ idx
1
DROP PROCEDURE p1;
#
-# Start of 10.4 tests
+# MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
+#
+SET sql_mode=ORACLE;
+BEGIN END;
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW BEGIN END;
+SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='tr';
+ACTION_STATEMENT BEGIN END
+DROP TRIGGER tr;
+DROP TABLE t1;
+#
+# End of 10.3 tests
#
#
# MDEV-19637 Crash on an SP variable assignment to a wrong subselect
diff --git a/mysql-test/suite/compat/oracle/t/events.test b/mysql-test/suite/compat/oracle/t/events.test
index e898528636a..fb56af51d87 100644
--- a/mysql-test/suite/compat/oracle/t/events.test
+++ b/mysql-test/suite/compat/oracle/t/events.test
@@ -25,5 +25,13 @@ let $wait_condition =
SELECT COUNT(*) FROM t1;
DROP TABLE t1;
-
SET GLOBAL event_scheduler=off;
+
+--echo #
+--echo # MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
+--echo #
+CREATE EVENT ev ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGIN END;
+--vertical_results
+SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='test' AND EVENT_NAME='ev';
+--horizontal_results
+DROP EVENT ev;
diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test
index 99bdc7166e0..69b8608b19a 100644
--- a/mysql-test/suite/compat/oracle/t/sp.test
+++ b/mysql-test/suite/compat/oracle/t/sp.test
@@ -2392,9 +2392,23 @@ DROP PROCEDURE p1;
--echo #
---echo # Start of 10.4 tests
+--echo # MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
--echo #
+SET sql_mode=ORACLE;
+BEGIN END;
+
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW BEGIN END;
+--vertical_results
+SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='tr';
+--horizontal_results
+DROP TRIGGER tr;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
--echo #
--echo # MDEV-19637 Crash on an SP variable assignment to a wrong subselect
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 4099caad3b3..35e8a3c725e 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -19,10 +19,8 @@ galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_b
galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): Assertion `state_ == s_idle || mode_ != m_local' failed
galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
-galera_ftwrl : MDEV-21525 galera.galera_ftwrl
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
-galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
galera_pc_ignore_sb : MDEV-20888 galera.galera_pc_ignore_sb
diff --git a/mysql-test/suite/galera/r/MDEV-28053.result b/mysql-test/suite/galera/r/MDEV-28053.result
new file mode 100644
index 00000000000..b3f93688dd0
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-28053.result
@@ -0,0 +1,14 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+connection node_2;
+connection node_3;
+DROP TABLE t1;
+connection node_2;
+connection node_2;
+STOP SLAVE;
+RESET SLAVE ALL;
+connection node_3;
+RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
index 8d0734f9df8..4fe33674701 100644
--- a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
+++ b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
@@ -1,33 +1,44 @@
connection node_2;
connection node_1;
connection node_1;
+SET GLOBAL auto_increment_offset=1;
+connection node_2;
+SET GLOBAL auto_increment_offset=2;
+connection node_1;
connection node_2;
connection node_2;
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
CREATE TABLE t1 (
-i int(11) NOT NULL AUTO_INCREMENT,
-c char(32) DEFAULT 'dummy_text',
-PRIMARY KEY (i)
+i int(11) NOT NULL primary key AUTO_INCREMENT,
+c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 2
+auto_increment_offset 1
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
connection node_2;
-select * from t1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 2
+auto_increment_offset 2
+select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
@@ -45,27 +56,34 @@ SET GLOBAL wsrep_auto_increment_control='OFF';
SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
CREATE TABLE t1 (
-i int(11) NOT NULL AUTO_INCREMENT,
-c char(32) DEFAULT 'dummy_text',
-PRIMARY KEY (i)
+i int(11) NOT NULL primary key AUTO_INCREMENT,
+c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 3
+auto_increment_offset 1
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_2;
-select * from t1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 2
+auto_increment_offset 2
+select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
@@ -74,6 +92,7 @@ i c
connection node_1;
SET GLOBAL wsrep_auto_increment_control='ON';
SET SESSION binlog_format='ROW';
+connection node_1;
show variables like 'binlog_format';
Variable_name Value
binlog_format ROW
@@ -89,29 +108,37 @@ auto_increment_increment 3
auto_increment_offset 1
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
+connection node_1;
drop table t1;
connection node_2;
SET GLOBAL wsrep_forced_binlog_format='ROW';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='ROW';
CREATE TABLE t1 (
-i int(11) NOT NULL AUTO_INCREMENT,
-c char(32) DEFAULT 'dummy_text',
-PRIMARY KEY (i)
+i int(11) NOT NULL primary key AUTO_INCREMENT,
+c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 2
+auto_increment_offset 1
insert into t1(i) values(null);
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
connection node_2;
-select * from t1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 2
+auto_increment_offset 2
+select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
@@ -129,23 +156,30 @@ SET GLOBAL wsrep_auto_increment_control='OFF';
SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
CREATE TABLE t1 (
-i int(11) NOT NULL AUTO_INCREMENT,
-c char(32) DEFAULT 'dummy_text',
-PRIMARY KEY (i)
+i int(11) NOT NULL primary key AUTO_INCREMENT,
+c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 3
+auto_increment_offset 1
insert into t1(i) values(null);
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
-select * from t1;
+select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_2;
-select * from t1;
+show variables like 'auto_increment%';
+Variable_name Value
+auto_increment_increment 2
+auto_increment_offset 2
+select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
@@ -159,13 +193,13 @@ binlog_format ROW
show variables like '%auto_increment%';
Variable_name Value
auto_increment_increment 2
-auto_increment_offset 1
+auto_increment_offset 2
wsrep_auto_increment_control ON
SET GLOBAL wsrep_auto_increment_control='OFF';
show variables like '%auto_increment%';
Variable_name Value
-auto_increment_increment 3
-auto_increment_offset 1
+auto_increment_increment 1
+auto_increment_offset 2
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
drop table t1;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
new file mode 100644
index 00000000000..8c84321e774
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
@@ -0,0 +1,190 @@
+--- r/galera_ist_MDEV-28423.result
++++ r/galera_ist_MDEV-28423,debug.reject
+@@ -517,3 +517,187 @@
+ 1
+ DROP TABLE t1;
+ COMMIT;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++connection node_1;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
++connection node_2;
++START TRANSACTION;
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
++SET wsrep_sync_wait = 0;
++Killing server ...
++connection node_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
++connection node_2;
++Performing --wsrep-recover ...
++connection node_2;
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
++COMMIT;
++connection node_1;
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
++COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
++ROLLBACK;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++connection node_1;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result b/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
new file mode 100644
index 00000000000..5a71b490a80
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
@@ -0,0 +1,519 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+Performing State Transfer on a server that has been temporarily disconnected
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Unloading wsrep provider ...
+SET GLOBAL wsrep_cluster_address = '';
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_disconnect_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+Performing State Transfer on a server that has been shut down cleanly and restarted
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Shutting down server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Starting server ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_shutdown_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+Performing State Transfer on a server that has been killed and restarted
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
new file mode 100644
index 00000000000..51d2a6bf157
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
@@ -0,0 +1,190 @@
+--- r/galera_ist_MDEV-28583.result
++++ r/galera_ist_MDEV-28583,debug.reject
+@@ -517,3 +517,187 @@
+ 1
+ DROP TABLE t1;
+ COMMIT;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++connection node_1;
++CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES (1,'node1_committed_before');
++INSERT INTO t1 VALUES (2,'node1_committed_before');
++INSERT INTO t1 VALUES (3,'node1_committed_before');
++INSERT INTO t1 VALUES (4,'node1_committed_before');
++INSERT INTO t1 VALUES (5,'node1_committed_before');
++connection node_2;
++START TRANSACTION;
++INSERT INTO t1 VALUES (6,'node2_committed_before');
++INSERT INTO t1 VALUES (7,'node2_committed_before');
++INSERT INTO t1 VALUES (8,'node2_committed_before');
++INSERT INTO t1 VALUES (9,'node2_committed_before');
++INSERT INTO t1 VALUES (10,'node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
++SET wsrep_sync_wait = 0;
++Killing server ...
++connection node_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
++INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
++connection node_2;
++Performing --wsrep-recover ...
++connection node_2;
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
++INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
++COMMIT;
++connection node_1;
++INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
++INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
++INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
++COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
++INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
++INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
++ROLLBACK;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++connection node_1;
++SET AUTOCOMMIT=ON;
++SET SESSION wsrep_sync_wait=15;
++SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++EXPECT_3
++3
++SELECT COUNT(*) AS EXPECT_35 FROM t1;
++EXPECT_35
++35
++SELECT * FROM t1;
++id f1 f2
++1 node1_committed_before NULL
++2 node1_committed_before NULL
++3 node1_committed_before NULL
++4 node1_committed_before NULL
++5 node1_committed_before NULL
++6 node2_committed_before NULL
++7 node2_committed_before NULL
++8 node2_committed_before NULL
++9 node2_committed_before NULL
++10 node2_committed_before NULL
++11 node1_committed_during NULL
++12 node1_committed_during NULL
++13 node1_committed_during NULL
++14 node1_committed_during NULL
++15 node1_committed_during NULL
++16 node1_to_be_committed_after NULL
++17 node1_to_be_committed_after NULL
++18 node1_to_be_committed_after NULL
++19 node1_to_be_committed_after NULL
++20 node1_to_be_committed_after NULL
++26 node2_committed_after NULL
++27 node2_committed_after NULL
++28 node2_committed_after NULL
++29 node2_committed_after NULL
++30 node2_committed_after NULL
++31 node1_to_be_committed_after NULL
++32 node1_to_be_committed_after NULL
++33 node1_to_be_committed_after NULL
++34 node1_to_be_committed_after NULL
++35 node1_to_be_committed_after NULL
++36 node1_committed_after NULL
++37 node1_committed_after NULL
++38 node1_committed_after NULL
++39 node1_committed_after NULL
++40 node1_committed_after NULL
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result b/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
new file mode 100644
index 00000000000..5a71b490a80
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
@@ -0,0 +1,519 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+Performing State Transfer on a server that has been temporarily disconnected
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Unloading wsrep provider ...
+SET GLOBAL wsrep_cluster_address = '';
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_disconnect_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+Performing State Transfer on a server that has been shut down cleanly and restarted
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Shutting down server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Starting server ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_shutdown_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_15 FROM t1;
+EXPECT_15
+35
+SELECT * from t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+Performing State Transfer on a server that has been killed and restarted
+connection node_1;
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1,'node1_committed_before');
+INSERT INTO t1 VALUES (2,'node1_committed_before');
+INSERT INTO t1 VALUES (3,'node1_committed_before');
+INSERT INTO t1 VALUES (4,'node1_committed_before');
+INSERT INTO t1 VALUES (5,'node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (6,'node2_committed_before');
+INSERT INTO t1 VALUES (7,'node2_committed_before');
+INSERT INTO t1 VALUES (8,'node2_committed_before');
+INSERT INTO t1 VALUES (9,'node2_committed_before');
+INSERT INTO t1 VALUES (10,'node2_committed_before');
+COMMIT;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11,'node1_committed_during');
+INSERT INTO t1 VALUES (12,'node1_committed_during');
+INSERT INTO t1 VALUES (13,'node1_committed_during');
+INSERT INTO t1 VALUES (14,'node1_committed_during');
+INSERT INTO t1 VALUES (15,'node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (26,'node2_committed_after');
+INSERT INTO t1 VALUES (27,'node2_committed_after');
+INSERT INTO t1 VALUES (28,'node2_committed_after');
+INSERT INTO t1 VALUES (29,'node2_committed_after');
+INSERT INTO t1 VALUES (30,'node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
+INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (36,'node1_committed_after');
+INSERT INTO t1 VALUES (37,'node1_committed_after');
+INSERT INTO t1 VALUES (38,'node1_committed_after');
+INSERT INTO t1 VALUES (39,'node1_committed_after');
+INSERT INTO t1 VALUES (40,'node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave;
+INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
+ROLLBACK;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
+EXPECT_35
+35
+SELECT * FROM t1;
+id f1
+1 node1_committed_before
+2 node1_committed_before
+3 node1_committed_before
+4 node1_committed_before
+5 node1_committed_before
+6 node2_committed_before
+7 node2_committed_before
+8 node2_committed_before
+9 node2_committed_before
+10 node2_committed_before
+11 node1_committed_during
+12 node1_committed_during
+13 node1_committed_during
+14 node1_committed_during
+15 node1_committed_during
+16 node1_to_be_committed_after
+17 node1_to_be_committed_after
+18 node1_to_be_committed_after
+19 node1_to_be_committed_after
+20 node1_to_be_committed_after
+26 node2_committed_after
+27 node2_committed_after
+28 node2_committed_after
+29 node2_committed_after
+30 node2_committed_after
+31 node1_to_be_committed_after
+32 node1_to_be_committed_after
+33 node1_to_be_committed_after
+34 node1_to_be_committed_after
+35 node1_to_be_committed_after
+36 node1_committed_after
+37 node1_committed_after
+38 node1_committed_after
+39 node1_committed_after
+40 node1_committed_after
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
diff --git a/mysql-test/suite/galera/r/galera_many_tables_nopk.result b/mysql-test/suite/galera/r/galera_many_tables_nopk.result
index 2a226defcc7..d341a1816e5 100644
--- a/mysql-test/suite/galera/r/galera_many_tables_nopk.result
+++ b/mysql-test/suite/galera/r/galera_many_tables_nopk.result
@@ -6,8 +6,8 @@ START TRANSACTION;
COMMIT;
connection node_2;
CREATE TABLE sum_table (f1 INTEGER);
-SELECT SUM(f1) = 900 FROM sum_table;
-SUM(f1) = 900
+SELECT SUM(f1) = 100 FROM sum_table;
+SUM(f1) = 100
1
connection node_1;
SET AUTOCOMMIT=OFF;
@@ -15,7 +15,7 @@ START TRANSACTION;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-UPDATE t900 SET f1 = 3;
+UPDATE t100 SET f1 = 3;
connection node_1;
COMMIT;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_read_only.result b/mysql-test/suite/galera/r/galera_read_only.result
index fe8b45fa596..e7e18ca8145 100644
--- a/mysql-test/suite/galera/r/galera_read_only.result
+++ b/mysql-test/suite/galera/r/galera_read_only.result
@@ -17,10 +17,18 @@ connect foo_node_2,127.0.0.1,foo,,test,$port_2,;
connection foo_node_2;
INSERT INTO t1 VALUES (2);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
connection node_2;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
1
+connection node_2;
+SET GLOBAL read_only=TRUE;
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
SET GLOBAL read_only=FALSE;
DROP TABLE t1;
DROP USER foo@localhost;
diff --git a/mysql-test/suite/galera/t/MDEV-28053.cnf b/mysql-test/suite/galera/t/MDEV-28053.cnf
new file mode 100644
index 00000000000..2a500639d1d
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-28053.cnf
@@ -0,0 +1,6 @@
+!include ../galera_2nodes_as_slave.cnf
+
+[mysqld]
+slave_parallel_threads=4
+slave_parallel_mode=optimistic
+gtid_strict_mode=1
diff --git a/mysql-test/suite/galera/t/MDEV-28053.test b/mysql-test/suite/galera/t/MDEV-28053.test
new file mode 100644
index 00000000000..85cb20c7e10
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-28053.test
@@ -0,0 +1,61 @@
+#
+# MDEV-28053 - Sysbench data load crashes Galera secondary node in
+# async master slave setup
+#
+# Setup: node 3 is a regular MariaDB server, nodes 1 and 2 are members
+# of a Galera cluster. Node 2 connects to node 3 through async replication.
+#
+# Test uses multiple parallel async applier threads (see MDEV-28053.cnf)
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+--connection node_3
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+#
+# Execute a few INSERTs, to simulate sysbench data load phase
+#
+--let $counter=100
+--disable_query_log
+while ($counter) {
+ --connection node_3
+ INSERT INTO t1 VALUES();
+ --dec $counter
+}
+--enable_query_log
+--let gtid = `SELECT @@last_gtid`
+
+#
+# Start async replication on node 2.
+# If bug is present, expect a crash when applying
+# events concurrently.
+#
+--connection node_2
+--disable_query_log
+--disable_result_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
+START SLAVE;
+--eval SELECT MASTER_GTID_WAIT('$gtid', 600)
+--enable_result_log
+--enable_query_log
+
+#
+# Cleanup
+#
+--connection node_3
+DROP TABLE t1;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_2
+STOP SLAVE;
+RESET SLAVE ALL;
+
+--connection node_3
+RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.cnf b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.cnf
index 889c81b4a0a..91e9199b092 100644
--- a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.cnf
+++ b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.cnf
@@ -2,6 +2,8 @@
[mysqld.1]
auto_increment_offset=1
+auto_increment_increment=1
[mysqld.2]
auto_increment_offset=2
+auto_increment_increment=1
diff --git a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
index 431fa90c8e2..994f7695fc6 100644
--- a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
+++ b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
@@ -3,7 +3,12 @@
##
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/force_restart.inc
+
+--connection node_1
+SET GLOBAL auto_increment_offset=1;
+--connection node_2
+SET GLOBAL auto_increment_offset=2;
--let $node_1=node_1
--let $node_2=node_2
@@ -30,23 +35,24 @@ call mtr.add_suppression("Unsafe statement written to the binary log");
--enable_query_log
CREATE TABLE t1 (
- i int(11) NOT NULL AUTO_INCREMENT,
- c char(32) DEFAULT 'dummy_text',
- PRIMARY KEY (i)
+ i int(11) NOT NULL primary key AUTO_INCREMENT,
+ c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
insert into t1(i) values(null);
-select * from t1;
+select * from t1 order by i;
insert into t1(i) values(null), (null), (null);
-select * from t1;
+select * from t1 order by i;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
-select * from t1;
+show variables like 'auto_increment%';
+select * from t1 order by i;
SET GLOBAL wsrep_forced_binlog_format='none';
@@ -80,36 +86,31 @@ SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
CREATE TABLE t1 (
- i int(11) NOT NULL AUTO_INCREMENT,
- c char(32) DEFAULT 'dummy_text',
- PRIMARY KEY (i)
+ i int(11) NOT NULL primary key AUTO_INCREMENT,
+ c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
insert into t1(i) values(null);
-select * from t1;
+select * from t1 order by i;
insert into t1(i) values(null), (null), (null);
-select * from t1;
+select * from t1 order by i;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
+show variables like 'auto_increment%';
-select * from t1;
+select * from t1 order by i;
--connection node_1
-
-##
-## Verify the return to automatic calculation of the step
-## and offset of the auto-increment:
-##
-
SET GLOBAL wsrep_auto_increment_control='ON';
-
SET SESSION binlog_format='ROW';
-
+--source include/auto_increment_offset_restore.inc
+--connection node_1
show variables like 'binlog_format';
show variables like '%auto_increment%';
@@ -127,7 +128,8 @@ show variables like '%auto_increment%';
##
SET GLOBAL wsrep_auto_increment_control='ON';
-
+--source include/auto_increment_offset_restore.inc
+--connection node_1
drop table t1;
##
@@ -142,24 +144,25 @@ SET GLOBAL wsrep_forced_binlog_format='ROW';
SET GLOBAL wsrep_forced_binlog_format='ROW';
CREATE TABLE t1 (
- i int(11) NOT NULL AUTO_INCREMENT,
- c char(32) DEFAULT 'dummy_text',
- PRIMARY KEY (i)
+ i int(11) NOT NULL primary key AUTO_INCREMENT,
+ c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
insert into t1(i) values(null);
-select * from t1;
+select * from t1 order by i;
insert into t1(i) values(null), (null), (null);
-select * from t1;
+select * from t1 order by i;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
-select * from t1;
+show variables like 'auto_increment%';
+select * from t1 order by i;
SET GLOBAL wsrep_forced_binlog_format='none';
@@ -189,24 +192,25 @@ SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
CREATE TABLE t1 (
- i int(11) NOT NULL AUTO_INCREMENT,
- c char(32) DEFAULT 'dummy_text',
- PRIMARY KEY (i)
+ i int(11) NOT NULL primary key AUTO_INCREMENT,
+ c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+show variables like 'auto_increment%';
insert into t1(i) values(null);
-select * from t1;
+select * from t1 order by i;
insert into t1(i) values(null), (null), (null);
-select * from t1;
+select * from t1 order by i;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
+show variables like 'auto_increment%';
-select * from t1;
+select * from t1 order by i;
--connection node_1
@@ -216,6 +220,7 @@ select * from t1;
##
SET GLOBAL wsrep_auto_increment_control='ON';
+--source include/auto_increment_offset_restore.inc
show variables like 'binlog_format';
show variables like '%auto_increment%';
diff --git a/mysql-test/suite/galera/t/galera_ist_MDEV-28423.cnf b/mysql-test/suite/galera/t/galera_ist_MDEV-28423.cnf
new file mode 100644
index 00000000000..691e52208b1
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_MDEV-28423.cnf
@@ -0,0 +1,44 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+# server-id=101
+#wsrep-debug=1
+innodb_file_per_table
+innodb_autoinc_lock_mode=2
+#wsrep_sst_method=rsync
+wsrep_sst_method=mariabackup
+wsrep_sst_auth=root:
+binlog_format=ROW
+core-file
+log-output=none
+wsrep_slave_threads=2
+wsrep_on=1
+gtid_strict_mode=1
+log_slave_updates=ON
+log_bin=binlog
+
+[mysqld.2]
+# server-id=102
+#wsrep-debug=1
+innodb_file_per_table
+innodb_autoinc_lock_mode=2
+#wsrep_sst_method=rsync
+wsrep_sst_method=mariabackup
+wsrep_sst_auth=root:
+binlog_format=ROW
+core-file
+log-output=none
+wsrep_slave_threads=2
+wsrep_on=1
+gtid_strict_mode=1
+log_slave_updates=ON
+log_bin=binlog
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+
+[sst]
+transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_ist_MDEV-28423.test b/mysql-test/suite/galera/t/galera_ist_MDEV-28423.test
new file mode 100644
index 00000000000..8668c4ce158
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_MDEV-28423.test
@@ -0,0 +1,18 @@
+# MDEV-28423: Galera IST is failing on Joiner node
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_mariabackup.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--source suite/galera/include/galera_st_disconnect_slave.inc
+--source suite/galera/include/galera_st_shutdown_slave.inc
+
+--source suite/galera/include/galera_st_kill_slave.inc
+--source suite/galera/include/galera_st_kill_slave_ddl.inc
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_ist_MDEV-28583.cnf b/mysql-test/suite/galera/t/galera_ist_MDEV-28583.cnf
new file mode 100644
index 00000000000..3835cd02a41
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_MDEV-28583.cnf
@@ -0,0 +1,44 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+# server-id=101
+#wsrep-debug=1
+innodb_file_per_table
+innodb_autoinc_lock_mode=2
+wsrep_sst_method=rsync
+#wsrep_sst_method=mariabackup
+wsrep_sst_auth=root:
+binlog_format=ROW
+core-file
+log-output=none
+wsrep_slave_threads=2
+wsrep_on=1
+gtid_strict_mode=1
+log_slave_updates=ON
+log_bin=binlog
+
+[mysqld.2]
+# server-id=102
+#wsrep-debug=1
+innodb_file_per_table
+innodb_autoinc_lock_mode=2
+wsrep_sst_method=rsync
+#wsrep_sst_method=mariabackup
+wsrep_sst_auth=root:
+binlog_format=ROW
+core-file
+log-output=none
+wsrep_slave_threads=2
+wsrep_on=1
+gtid_strict_mode=1
+log_slave_updates=ON
+log_bin=binlog
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+
+[sst]
+transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_ist_MDEV-28583.test b/mysql-test/suite/galera/t/galera_ist_MDEV-28583.test
new file mode 100644
index 00000000000..2c8c0bd80da
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_MDEV-28583.test
@@ -0,0 +1,18 @@
+# MDEV-28583: Galera: binlogs disappear after rsync IST
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_mariabackup.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--source suite/galera/include/galera_st_disconnect_slave.inc
+--source suite/galera/include/galera_st_shutdown_slave.inc
+
+--source suite/galera/include/galera_st_kill_slave.inc
+--source suite/galera/include/galera_st_kill_slave_ddl.inc
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_many_tables_nopk.test b/mysql-test/suite/galera/t/galera_many_tables_nopk.test
index 98a65b7c660..5bfab686726 100644
--- a/mysql-test/suite/galera/t/galera_many_tables_nopk.test
+++ b/mysql-test/suite/galera/t/galera_many_tables_nopk.test
@@ -7,18 +7,17 @@ if (!`SELECT @@open_files_limit >= 1024`){
}
#
-# This test forces 900 tables without a PK to participate in a single
-# transaction. The reason for 900 is that some linux system has by default
-# a limit of 1024 open files / process
+# This test forces 100 tables without a PK to participate in a single
+# transaction.
#
#
-# First, create 900 tables
+# First, create 100 tables
#
--connection node_1
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -28,7 +27,7 @@ while ($count)
--dec $count
}
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -39,13 +38,13 @@ while ($count)
}
#
-# Second, perform 900 updates
+# Second, perform 100 updates
#
SET AUTOCOMMIT=OFF;
START TRANSACTION;
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -63,7 +62,7 @@ COMMIT;
--connection node_2
CREATE TABLE sum_table (f1 INTEGER);
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -73,7 +72,7 @@ while ($count)
--dec $count
}
-SELECT SUM(f1) = 900 FROM sum_table;
+SELECT SUM(f1) = 100 FROM sum_table;
#
# Fourth, create a deadlock
@@ -83,7 +82,7 @@ SELECT SUM(f1) = 900 FROM sum_table;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
---let $count = 900
+--let $count = 100
while ($count)
{
--disable_query_log
@@ -96,7 +95,7 @@ while ($count)
--connection node_2
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-UPDATE t900 SET f1 = 3;
+UPDATE t100 SET f1 = 3;
--connection node_1
COMMIT;
diff --git a/mysql-test/suite/galera/t/galera_read_only.test b/mysql-test/suite/galera/t/galera_read_only.test
index c0fa4af07e0..56fe2fdd910 100644
--- a/mysql-test/suite/galera/t/galera_read_only.test
+++ b/mysql-test/suite/galera/t/galera_read_only.test
@@ -28,9 +28,20 @@ CREATE USER foo@localhost;
--connection foo_node_2
--error ER_OPTION_PREVENTS_STATEMENT
INSERT INTO t1 VALUES (2);
+# Writes to temporary tables are allowed
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
--connection node_2
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+
+--connection node_2
+SET GLOBAL read_only=TRUE;
+# Writes to temporary tables are allowed
+CREATE TEMPORARY TABLE t2(id int not null primary key) engine=innodb;
+INSERT INTO t2 values (1);
+DROP TABLE t2;
# Cleanup
SET GLOBAL read_only=FALSE;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
index f51eb815cd5..deef311b1e4 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
@@ -74,3 +74,4 @@ cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHER
SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
EXPECT_3
3
+disconnect node_3;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
index 52bbf3a652c..d6e20d3bbfb 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
@@ -17,6 +17,9 @@
# Make the test fail if table structure has changed
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
SHOW CREATE TABLE mysql.wsrep_cluster;
SHOW CREATE TABLE mysql.wsrep_cluster_members;
@@ -74,3 +77,5 @@ SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STAT
SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members;
--source ../galera/include/auto_increment_offset_restore.inc
+
+--disconnect node_3
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
index 902aa27d5aa..34995d35a4f 100644
--- a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
+++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
@@ -2,6 +2,8 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
+connection node_2;
+call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
index d1b0d4b8c88..5d4a58b2d03 100644
--- a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
+++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
@@ -8,6 +8,8 @@
--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 scan the last segment to the end. Last events may be missing. Last recovered event:.*");
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
index 5e4946bf793..a504bb4aa39 100644
--- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
+++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
@@ -69,8 +69,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL
buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Buffer pages currently free (innodb_buffer_pool_pages_free)
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages created (innodb_pages_created)
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages written (innodb_pages_written)
-buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of index pages written (innodb_index_pages_written)
-buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of non index pages written (innodb_non_index_pages_written)
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of pages read (innodb_pages_read)
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of secondary record reads triggered cluster read
buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of secondary record reads avoided triggering cluster read
diff --git a/mysql-test/suite/innodb/r/innodb_status_variables.result b/mysql-test/suite/innodb/r/innodb_status_variables.result
index 02f73f37d66..086e4e1d1e7 100644
--- a/mysql-test/suite/innodb/r/innodb_status_variables.result
+++ b/mysql-test/suite/innodb/r/innodb_status_variables.result
@@ -87,8 +87,6 @@ INNODB_TRUNCATED_STATUS_WRITES
INNODB_AVAILABLE_UNDO_LOGS
INNODB_UNDO_TRUNCATIONS
INNODB_PAGE_COMPRESSION_SAVED
-INNODB_NUM_INDEX_PAGES_WRITTEN
-INNODB_NUM_NON_INDEX_PAGES_WRITTEN
INNODB_NUM_PAGES_PAGE_COMPRESSED
INNODB_NUM_PAGE_COMPRESSED_TRIM_OP
INNODB_NUM_PAGES_PAGE_DECOMPRESSED
@@ -115,7 +113,6 @@ INNODB_ENCRYPTION_ROTATION_PAGES_READ_FROM_DISK
INNODB_ENCRYPTION_ROTATION_PAGES_MODIFIED
INNODB_ENCRYPTION_ROTATION_PAGES_FLUSHED
INNODB_ENCRYPTION_ROTATION_ESTIMATED_IOPS
-INNODB_ENCRYPTION_KEY_ROTATION_LIST_LENGTH
INNODB_ENCRYPTION_N_MERGE_BLOCKS_ENCRYPTED
INNODB_ENCRYPTION_N_MERGE_BLOCKS_DECRYPTED
INNODB_ENCRYPTION_N_ROWLOG_BLOCKS_ENCRYPTED
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index ce10aceb51b..922c66a068f 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -35,8 +35,6 @@ buffer_pool_bytes_dirty disabled
buffer_pool_pages_free disabled
buffer_pages_created disabled
buffer_pages_written disabled
-buffer_index_pages_written disabled
-buffer_non_index_pages_written disabled
buffer_pages_read disabled
buffer_index_sec_rec_cluster_reads disabled
buffer_index_sec_rec_cluster_reads_avoided disabled
diff --git a/mysql-test/suite/mariabackup/incremental_backup.test b/mysql-test/suite/mariabackup/incremental_backup.test
index 62cdf9e6cb3..ec38af4c27d 100644
--- a/mysql-test/suite/mariabackup/incremental_backup.test
+++ b/mysql-test/suite/mariabackup/incremental_backup.test
@@ -8,6 +8,7 @@ if (`select @@max_binlog_stmt_cache_size = 4294963200 and @@innodb_page_size = 6
call mtr.add_suppression("InnoDB: New log files created");
+let $test_comp=`select @@innodb_page_size < 32768`;
let basedir=$MYSQLTEST_VARDIR/tmp/backup;
let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
@@ -16,6 +17,14 @@ CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB;
# MDEV-515 takes X-lock on the table for the first insert.
# So concurrent insert won't happen on the table
INSERT INTO t VALUES(100);
+if ($test_comp) {
+ # If MDEV-28474 is not fixed, backup preparing will crash with SIGSEGV.
+ --disable_query_log
+ --disable_result_log
+ CREATE TABLE t_comp(i INT PRIMARY KEY) ENGINE INNODB ROW_FORMAT=COMPRESSED;
+ --enable_query_log
+ --enable_result_log
+}
BEGIN;
INSERT INTO t VALUES(2);
connect (con1,localhost,root,,);
@@ -99,6 +108,13 @@ let $targetdir=$basedir;
SELECT * FROM t;
DROP TABLE t;
+if ($test_comp) {
+ --disable_query_log
+ --disable_result_log
+ DROP TABLE t_comp;
+ --enable_query_log
+ --enable_result_log
+}
DROP TABLE t_aria;
# Cleanup
diff --git a/mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.result b/mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.result
new file mode 100644
index 00000000000..e3f8bb245e7
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.result
@@ -0,0 +1,18 @@
+call mtr.add_suppression("InnoDB: New log files created");
+CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(0);
+CREATE DATABASE test1;
+CREATE TABLE test1.t1 (a INT) ENGINE=InnoDB;
+INSERT INTO test1.t1 VALUES (1000);
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM t1;
+i
+0
+SELECT * FROM test1.t1;
+a
+1000
+DROP TABLE t1;
+DROP DATABASE test1;
diff --git a/mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.test b/mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.test
new file mode 100644
index 00000000000..a79d280b668
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_backup_newdb_before_inc.test
@@ -0,0 +1,35 @@
+--source include/have_innodb.inc
+
+call mtr.add_suppression("InnoDB: New log files created");
+
+--let basedir=$MYSQLTEST_VARDIR/tmp/backup
+--let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1
+
+CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(0);
+
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir
+--enable_result_log
+
+CREATE DATABASE test1;
+CREATE TABLE test1.t1 (a INT) ENGINE=InnoDB;
+INSERT INTO test1.t1 VALUES (1000);
+
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=2 --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir
+--exec $XTRABACKUP --prepare --target-dir=$basedir
+--exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir
+--enable_result_log
+
+--let $targetdir=$basedir
+--source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT * FROM t1;
+SELECT * FROM test1.t1;
+
+DROP TABLE t1;
+DROP DATABASE test1;
+--rmdir $basedir
+--rmdir $incremental_dir
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_glle_no_terminate.result b/mysql-test/suite/rpl/r/rpl_gtid_glle_no_terminate.result
new file mode 100644
index 00000000000..f4d257c2668
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_gtid_glle_no_terminate.result
@@ -0,0 +1,46 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
+#
+# Initialize test data
+connection master;
+create table t1 (a int);
+SET @@session.server_id= 3;
+create table t2 (a int);
+include/save_master_gtid.inc
+#
+# Have the replica "reconnect" and the primary will send Gtid, Glle, DDL
+connection slave;
+set global gtid_slave_pos="0-3-1";
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+#
+# Ensure that the replica did not error
+connection slave;
+include/sync_with_master_gtid.inc
+Last_SQL_Error =
+Last_SQL_Errno = 0
+#
+# Ensure that the primary sent a Glle after a Gtid event
+include/show_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS
+slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+slave-relay-bin.000002 # Gtid_list # # []
+slave-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001
+slave-relay-bin.000002 # Gtid # # GTID #-#-#
+slave-relay-bin.000002 # Gtid_list # # [#-#-#]
+slave-relay-bin.000002 # Query # # use `test`; create table t2 (a int)
+#
+# Ensure the DDL was executed on the replica
+#
+# Cleanup
+# t1 does not make it to the replica
+connection master;
+set sql_log_bin=0;
+DROP TABLE t1;
+set sql_log_bin=1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test b/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
new file mode 100644
index 00000000000..f0f38a31da6
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
@@ -0,0 +1,72 @@
+#
+# Purpose:
+# If a fake Glle event follows a Gtid event, we need to ensure the rest of
+# the group should not terminate at the Glle event. MDEV-28550 revealed that
+# a Glle would terminate the event and upon reconnect, the DDL would be lost.
+#
+# Methodology:
+# Force the primary to send a fake GLLE event after a GTID on a "reconnect"
+# and ensure that both 1) the replica does not error, and 2) the original
+# command within the GTID is executed.
+#
+# References:
+# MDEV-28550: improper handling of replication event group that contains Gtid_log_list_event
+
+--source include/master-slave.inc
+
+# Independent of binlog format
+--source include/have_binlog_format_statement.inc
+
+--connection slave
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
+
+--echo #
+--echo # Initialize test data
+--connection master
+create table t1 (a int);
+SET @@session.server_id= 3;
+create table t2 (a int);
+--source include/save_master_gtid.inc
+
+--echo #
+--echo # Have the replica "reconnect" and the primary will send Gtid, Glle, DDL
+--connection slave
+eval set global gtid_slave_pos="0-3-1";
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+--echo #
+--echo # Ensure that the replica did not error
+connection slave;
+--source include/sync_with_master_gtid.inc
+let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
+--echo Last_SQL_Error = $error
+let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
+--echo Last_SQL_Errno = $errno
+
+--echo #
+--echo # Ensure that the primary sent a Glle after a Gtid event
+let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
+let $binlog_start= $relaylog_start;
+let $binlog_limit=0,10;
+--source include/show_relaylog_events.inc
+
+--echo #
+--echo # Ensure the DDL was executed on the replica
+if (!`SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'test' AND table_name = 't2'`)
+{
+ die "t2 should exist on slave";
+}
+
+--echo #
+--echo # Cleanup
+
+--echo # t1 does not make it to the replica
+--connection master
+set sql_log_bin=0;
+DROP TABLE t1;
+set sql_log_bin=1;
+DROP TABLE t2;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/group_concat_max_len_func.result b/mysql-test/suite/sys_vars/r/group_concat_max_len_func.result
index 30e2639af37..01f44ae51be 100644
--- a/mysql-test/suite/sys_vars/r/group_concat_max_len_func.result
+++ b/mysql-test/suite/sys_vars/r/group_concat_max_len_func.result
@@ -94,4 +94,58 @@ DROP TABLE t1;
disconnect test_con2;
disconnect test_con1;
connection default;
+CREATE TABLE t1(val VARCHAR(100) PRIMARY KEY) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci;
+INSERT INTO t1 VALUES('bar');
+INSERT INTO t1 VALUES('foo');
+SET group_concat_max_len = 1073741823;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+Variable_name Value
+group_concat_max_len 1073741823
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+simple
+bar,foo
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+nested
+bar,foo
+SET group_concat_max_len = 1073741824;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+Variable_name Value
+group_concat_max_len 1073741824
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+simple
+bar,foo
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+nested
+bar,foo
+SET group_concat_max_len = 1073741825;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+Variable_name Value
+group_concat_max_len 1073741825
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+simple
+bar,foo
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+nested
+bar,foo
+SET group_concat_max_len = 1073741826;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+Variable_name Value
+group_concat_max_len 1073741826
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+simple
+bar,foo
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+nested
+bar,foo
+SET group_concat_max_len = 2147483649;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+Variable_name Value
+group_concat_max_len 2147483649
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+simple
+bar,foo
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+nested
+bar,foo
+DROP TABLE t1;
SET @@global.group_concat_max_len = @save;
diff --git a/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test b/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test
index b053ee229d7..d90fc061289 100644
--- a/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test
+++ b/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test
@@ -132,4 +132,35 @@ disconnect test_con1;
connection default;
+CREATE TABLE t1(val VARCHAR(100) PRIMARY KEY) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci;
+INSERT INTO t1 VALUES('bar');
+INSERT INTO t1 VALUES('foo');
+
+SET group_concat_max_len = 1073741823;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+
+SET group_concat_max_len = 1073741824;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+
+SET group_concat_max_len = 1073741825;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+
+SET group_concat_max_len = 1073741826;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+
+SET group_concat_max_len = 2147483649;
+SHOW VARIABLES LIKE 'group_concat_max_len';
+SELECT GROUP_CONCAT(val) AS simple FROM t1;
+SELECT * FROM ( SELECT GROUP_CONCAT(val) AS nested FROM t1) As tmp;
+
+DROP TABLE t1;
+
SET @@global.group_concat_max_len = @save;
diff --git a/mysql-test/suite/sysschema/r/pr_create_synonym_db.result b/mysql-test/suite/sysschema/r/pr_create_synonym_db.result
index bd7e4edc6e6..8c0e8dfa957 100644
--- a/mysql-test/suite/sysschema/r/pr_create_synonym_db.result
+++ b/mysql-test/suite/sysschema/r/pr_create_synonym_db.result
@@ -50,3 +50,17 @@ DROP TABLE test.t1;
DROP TABLE test.t2;
DROP TABLE `is`;
DROP TABLE `ab``c`;
+#
+# MDEV-28342: sys.create_synonym_db fails
+# when a temporary table masks a base table
+#
+create database db;
+use db;
+create table a(a int);
+create table t (b int);
+create table b(a int);
+create temporary table b (a int);
+call sys.create_synonym_db('db','db_copy');
+ERROR HY000: Table`db`.`b`shadows base table. View cannot be created! Terminating!
+drop database db;
+drop database db_copy;
diff --git a/mysql-test/suite/sysschema/t/pr_create_synonym_db.test b/mysql-test/suite/sysschema/t/pr_create_synonym_db.test
index 4fbe8759380..30c6f502e30 100644
--- a/mysql-test/suite/sysschema/t/pr_create_synonym_db.test
+++ b/mysql-test/suite/sysschema/t/pr_create_synonym_db.test
@@ -50,3 +50,20 @@ DROP TABLE test.t1;
DROP TABLE test.t2;
DROP TABLE `is`;
DROP TABLE `ab``c`;
+
+--echo #
+--echo # MDEV-28342: sys.create_synonym_db fails
+--echo # when a temporary table masks a base table
+--echo #
+
+create database db;
+use db;
+create table a(a int);
+create table t (b int);
+create table b(a int);
+create temporary table b (a int);
+--error ER_SIGNAL_EXCEPTION
+call sys.create_synonym_db('db','db_copy');
+
+drop database db;
+drop database db_copy;
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index 1fc3e785272..4ce3b4ef281 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -1525,6 +1525,18 @@ count(*)
100
drop table t1;
#
+# MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
+#
+create table tcount (c int unsigned);
+insert into tcount values (0);
+create table t (f int) with system versioning
+partition by system_time limit 1000
+(partition p1 history, partition pn current);
+insert into t values (1),(2);
+create trigger tr before insert on t for each row update tcount set c = c + 1;
+insert into t select * from t;
+drop table tcount, t;
+#
# End of 10.3 tests
#
#
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 26c06dd5687..de00bdce524 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -1371,6 +1371,23 @@ select count(*) from t1 partition (p1);
drop table t1;
--echo #
+--echo # MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
+--echo #
+create table tcount (c int unsigned);
+insert into tcount values (0);
+
+create table t (f int) with system versioning
+partition by system_time limit 1000
+(partition p1 history, partition pn current);
+insert into t values (1),(2);
+create trigger tr before insert on t for each row update tcount set c = c + 1;
+
+insert into t select * from t;
+
+# cleanup
+drop table tcount, t;
+
+--echo #
--echo # End of 10.3 tests
--echo #