summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Nesterenko <brandon.nesterenko@mariadb.com>2023-03-08 13:50:11 -0700
committerBrandon Nesterenko <brandon.nesterenko@mariadb.com>2023-05-01 15:32:09 -0600
commit9625306914d1c53c18e26c829bfbde0f9e91ebd7 (patch)
tree31a730fc7269114a2a6de8e564bf7a54e1505f29
parent189be7df010747def3a4dcbc14f48124a006a59f (diff)
downloadmariadb-git-bb-10.4-MDEV-13915.tar.gz
MDEV-13915: Updates to existing MTR testsbb-10.4-MDEV-13915
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel.result6
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel2.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel.test15
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel2.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test2
8 files changed, 28 insertions, 11 deletions
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result
index b75a66a634a..1163d4fc686 100644
--- a/mysql-test/suite/binlog_encryption/rpl_parallel.result
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result
@@ -742,7 +742,6 @@ a b
61 61
62 62
63 63
-64 64
68 68
69 69
70 70
@@ -827,6 +826,8 @@ SET binlog_format=@old_format;
connection server_2;
SET debug_sync='RESET';
include/start_slave.inc
+SET debug_sync='now WAIT_FOR query_waiting';
+SET debug_sync='now SIGNAL query_cont';
SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
a b
80 0
@@ -1055,7 +1056,7 @@ SET debug_sync='RESET';
connection server_1;
SET debug_sync='RESET';
connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1317]
+include/wait_for_slave_sql_error.inc [errno=1317,1593]
STOP SLAVE IO_THREAD;
SET GLOBAL gtid_slave_pos= 'AFTER_ERROR_GTID_POS';
include/start_slave.inc
@@ -1215,6 +1216,7 @@ connection server_2;
include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
a
+40
41
42
include/start_slave.inc
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 08af8487afd..30ae1457991 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -44,10 +44,10 @@ wait/synch/cond/sql/COND_flush_thread_cache YES YES
wait/synch/cond/sql/COND_group_commit_orderer YES YES
wait/synch/cond/sql/COND_gtid_ignore_duplicates YES YES
wait/synch/cond/sql/COND_manager YES YES
+wait/synch/cond/sql/COND_parallel_abort YES YES
wait/synch/cond/sql/COND_parallel_entry YES YES
wait/synch/cond/sql/COND_prepare_ordered YES YES
wait/synch/cond/sql/COND_queue_state YES YES
-wait/synch/cond/sql/COND_rpl_thread YES YES
select * from performance_schema.setup_instruments
where name='Wait';
select * from performance_schema.setup_instruments
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
index 9b2e68d366e..178339cb53d 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel.result
@@ -741,7 +741,6 @@ a b
61 61
62 62
63 63
-64 64
68 68
69 69
70 70
@@ -826,6 +825,8 @@ SET binlog_format=@old_format;
connection server_2;
SET debug_sync='RESET';
include/start_slave.inc
+SET debug_sync='now WAIT_FOR query_waiting';
+SET debug_sync='now SIGNAL query_cont';
SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
a b
80 0
@@ -1054,7 +1055,7 @@ SET debug_sync='RESET';
connection server_1;
SET debug_sync='RESET';
connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1317]
+include/wait_for_slave_sql_error.inc [errno=1317,1593]
STOP SLAVE IO_THREAD;
SET GLOBAL gtid_slave_pos= 'AFTER_ERROR_GTID_POS';
include/start_slave.inc
@@ -1214,6 +1215,7 @@ connection server_2;
include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
a
+40
41
42
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel2.result b/mysql-test/suite/rpl/r/rpl_parallel2.result
index 559c56271b8..e34e903df9c 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel2.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel2.result
@@ -1,6 +1,7 @@
include/rpl_init.inc [topology=1->2]
*** MDEV-5509: Incorrect value for Seconds_Behind_Master if parallel replication ***
connection server_2;
+SET STATEMENT sql_log_bin=0 FOR call mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
set @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
include/stop_slave.inc
@@ -30,7 +31,7 @@ SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
a b
10 0
connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1062]
+include/wait_for_slave_sql_error.inc [errno=1062,1593]
SET GLOBAL slave_parallel_threads=8;
STOP SLAVE;
SET GLOBAL sql_slave_skip_counter= 1;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
index e05e824eed3..220efd4fa03 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_mdev6589.result
@@ -94,7 +94,7 @@ connection con_temp1;
COMMIT;
SET sql_log_bin=1;
connection server_2;
-include/wait_for_slave_sql_error.inc [errno=1062]
+include/wait_for_slave_sql_error.inc [errno=1062,1593]
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test
index 9ba7a30f2eb..d71b1c5b8ee 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel.test
@@ -952,6 +952,9 @@ eval KILL $d1_thd_id;
# Wait until T3 has reacted on the kill.
SET debug_sync='now WAIT_FOR t3_killed';
+--let $wait_condition= select count(*)=1 from information_schema.processlist where state LIKE 'Killing slave' and command='Slave_SQL'
+--source include/wait_condition.inc
+
# Now we can allow T1 to proceed.
SET debug_sync='now SIGNAL t1_cont';
@@ -959,7 +962,7 @@ SET debug_sync='now SIGNAL t1_cont';
--source include/wait_for_slave_sql_error.inc
STOP SLAVE IO_THREAD;
# Since T2, T3, and T4 run in parallel, we can not be sure if T2 will have time
-# to commit or not before the stop. However, T1 should commit, and T3/T4 may
+# to commit or not before the stop. However, T1 should rollback, and T3/T4 may
# not have committed. (After slave restart we check that all become committed
# eventually).
SELECT * FROM t3 WHERE a >= 60 AND a != 65 ORDER BY a;
@@ -1075,6 +1078,14 @@ SET binlog_format=@old_format;
--connection server_2
SET debug_sync='RESET';
--source include/start_slave.inc
+
+# Test amendment from MDEV-13915:
+# A worker thread's event queue is no longer executed on replica stop.
+# The signal query_cont needs to be re-sent because the transaction was
+# aborted.
+SET debug_sync='now WAIT_FOR query_waiting';
+SET debug_sync='now SIGNAL query_cont';
+
--sync_with_master
SELECT * FROM t3 WHERE a >= 80 ORDER BY a;
@@ -1407,7 +1418,7 @@ SET debug_sync='RESET';
--connection server_2
---let $slave_sql_errno= 1317
+--let $slave_sql_errno= 1317,1593
--source include/wait_for_slave_sql_error.inc
STOP SLAVE IO_THREAD;
--replace_result $after_error_gtid_pos AFTER_ERROR_GTID_POS
diff --git a/mysql-test/suite/rpl/t/rpl_parallel2.test b/mysql-test/suite/rpl/t/rpl_parallel2.test
index 8934b15e546..17e1590df89 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel2.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel2.test
@@ -7,6 +7,7 @@
--echo *** MDEV-5509: Incorrect value for Seconds_Behind_Master if parallel replication ***
--connection server_2
+SET STATEMENT sql_log_bin=0 FOR call mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
set @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
--source include/stop_slave.inc
@@ -54,7 +55,7 @@ INSERT INTO t1 VALUES (10,0);
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
--connection server_2
---let $slave_sql_errno= 1062
+--let $slave_sql_errno= 1062,1593
--source include/wait_for_slave_sql_error.inc
# At this point, the worker threads should have stopped also.
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test b/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test
index 5929fad71df..7bf03bbff26 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test
@@ -102,7 +102,7 @@ COMMIT;
SET sql_log_bin=1;
--connection server_2
---let $slave_sql_errno= 1062
+--let $slave_sql_errno= 1062,1593
--source include/wait_for_slave_sql_error.inc
SELECT * FROM t1 ORDER BY a;