Commit 96253069 authored by Brandon Nesterenko's avatar Brandon Nesterenko

MDEV-13915: Updates to existing MTR tests

parent 189be7df
......@@ -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
......
......@@ -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
......
......@@ -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
......
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;
......
......@@ -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
......
......@@ -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
......
......@@ -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.
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment