Commit a7d186a1 authored by Anel Husakovic's avatar Anel Husakovic Committed by Anel

MDEV-32168: slave_error_param condition is never checked from the wait_for_slave_param.inc

- Reviewer: <knielsen@knielsen-hq.org>
            <brandon.nesterenko@mariadb.com>
            <andrei.elkin@mariadb.com>
parent d4be70af
...@@ -59,7 +59,7 @@ let $_wfsie_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); ...@@ -59,7 +59,7 @@ let $_wfsie_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
if ($slave_io_errno == '') { if ($slave_io_errno == '') {
--echo !!!ERROR IN TEST: you must set \$slave_io_errno before you source --echo !!!ERROR IN TEST: you must set \$slave_io_errno before you source
--echo !!!wait_for_slave_sql_error.inc. The error we got this time was '$_wfsie_errno', --echo !!!wait_for_slave_io_error.inc. The error we got this time was '$_wfsie_errno',
--echo !!!so you probably want to add the following line to your test case: --echo !!!so you probably want to add the following line to your test case:
--echo !!! --let \$slave_io_errno= $_wfsie_errno --echo !!! --let \$slave_io_errno= $_wfsie_errno
--die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
......
...@@ -56,11 +56,6 @@ if (!$_slave_timeout) ...@@ -56,11 +56,6 @@ if (!$_slave_timeout)
} }
} }
if ($slave_error_param == '')
{
--let $slave_error_param= 1
}
let $_slave_param_comparison= $slave_param_comparison; let $_slave_param_comparison= $slave_param_comparison;
if (!$_slave_param_comparison) if (!$_slave_param_comparison)
{ {
...@@ -90,7 +85,7 @@ while ($_slave_continue) ...@@ -90,7 +85,7 @@ while ($_slave_continue)
--let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1) --let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1)
# Check if an error condition is reached. # Check if an error condition is reached.
if (!$slave_error_param) if ($slave_error_param)
{ {
--let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1) --let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1)
if ($_show_slave_status_error_value) if ($_show_slave_status_error_value)
......
...@@ -136,6 +136,8 @@ start slave; ...@@ -136,6 +136,8 @@ start slave;
SHOW TABLES; SHOW TABLES;
--disable_connect_log --disable_connect_log
# IO thread is stopped, stop SQL thread only
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
--enable_connect_log --enable_connect_log
reset slave; reset slave;
......
...@@ -132,6 +132,8 @@ if (`SELECT strcmp("$gsp","")`) ...@@ -132,6 +132,8 @@ if (`SELECT strcmp("$gsp","")`)
SHOW TABLES; SHOW TABLES;
--disable_connect_log --disable_connect_log
# IO thread is stopped, wait for SQL thread to be stopped
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
--enable_connect_log --enable_connect_log
reset slave; reset slave;
......
...@@ -897,7 +897,6 @@ connection con2; ...@@ -897,7 +897,6 @@ connection con2;
SET debug_sync='RESET'; SET debug_sync='RESET';
connection server_2; connection server_2;
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t3 WHERE a >= 110 ORDER BY a; SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
a b a b
110 1 110 1
......
...@@ -35,6 +35,7 @@ connection server_2; ...@@ -35,6 +35,7 @@ connection server_2;
connection con_temp2; connection con_temp2;
COMMIT; COMMIT;
connection server_2; connection server_2;
include/wait_for_slave_sql_error.inc [errno=1062]
include/stop_slave.inc include/stop_slave.inc
include/assert.inc [table t1 should have zero rows where a>32] include/assert.inc [table t1 should have zero rows where a>32]
SELECT * FROM t1 WHERE a>32; SELECT * FROM t1 WHERE a>32;
......
...@@ -97,8 +97,9 @@ set default_master_connection = 'slave1'; ...@@ -97,8 +97,9 @@ set default_master_connection = 'slave1';
STOP SLAVE; STOP SLAVE;
include/wait_for_slave_to_stop.inc include/wait_for_slave_to_stop.inc
set default_master_connection = 'slave2'; set default_master_connection = 'slave2';
include/wait_for_slave_sql_error.inc [errno=1942]
STOP SLAVE; STOP SLAVE;
include/wait_for_slave_to_stop.inc include/stop_slave.inc
set default_master_connection = 'slave1'; set default_master_connection = 'slave1';
START SLAVE; START SLAVE;
include/wait_for_slave_to_start.inc include/wait_for_slave_to_start.inc
......
...@@ -118,8 +118,11 @@ set default_master_connection = 'slave1'; ...@@ -118,8 +118,11 @@ set default_master_connection = 'slave1';
STOP SLAVE; STOP SLAVE;
--source include/wait_for_slave_to_stop.inc --source include/wait_for_slave_to_stop.inc
set default_master_connection = 'slave2'; set default_master_connection = 'slave2';
--let $slave_sql_errno= 1942
--source include/wait_for_slave_sql_error.inc
STOP SLAVE; STOP SLAVE;
--source include/wait_for_slave_to_stop.inc --let $rpl_only_running_threads= 1
--source include/stop_slave.inc
set default_master_connection = 'slave1'; set default_master_connection = 'slave1';
START SLAVE; START SLAVE;
--source include/wait_for_slave_to_start.inc --source include/wait_for_slave_to_start.inc
......
...@@ -50,8 +50,8 @@ insert into t1 values (3); ...@@ -50,8 +50,8 @@ insert into t1 values (3);
commit; commit;
--connection slave --connection slave
--let $slave_timeout=1032 --let $slave_sql_errno=1032
--source include/wait_for_slave_sql_to_stop.inc --source include/wait_for_slave_sql_error.inc
update t1 set a=1 where a=2; update t1 set a=1 where a=2;
set @@global.slave_parallel_threads = @save.slave_parallel_threads; set @@global.slave_parallel_threads = @save.slave_parallel_threads;
......
...@@ -75,8 +75,8 @@ drop table t2; ...@@ -75,8 +75,8 @@ drop table t2;
commit; commit;
--connection slave --connection slave
--let $slave_timeout=1032 --let $slave_sql_errno=1032
--source include/wait_for_slave_sql_to_stop.inc --source include/wait_for_slave_sql_error.inc
update t1 set a=1 where a=2; update t1 set a=1 where a=2;
set @@global.slave_parallel_threads = @save.slave_parallel_threads; set @@global.slave_parallel_threads = @save.slave_parallel_threads;
......
...@@ -411,6 +411,8 @@ while ($n) ...@@ -411,6 +411,8 @@ while ($n)
COMMIT; COMMIT;
--connection slave --connection slave
# Multi-statement transaction raised ER_TRANS_CACHE_FULL (4096=128x32)
# that will stop SQL slave thread
--let $slave_sql_errno= 1197 --let $slave_sql_errno= 1197
if (`SELECT @@binlog_format = 'ROW'`) if (`SELECT @@binlog_format = 'ROW'`)
{ {
...@@ -430,6 +432,8 @@ source include/show_binlog_events.inc; ...@@ -430,6 +432,8 @@ source include/show_binlog_events.inc;
--replace_result $old_binlog_stmt_cache_size ORIGINAL_VALUE --replace_result $old_binlog_stmt_cache_size ORIGINAL_VALUE
--eval SET GLOBAL binlog_stmt_cache_size= $old_binlog_stmt_cache_size --eval SET GLOBAL binlog_stmt_cache_size= $old_binlog_stmt_cache_size
# SQL slave is stopped, stop only IO thread
--let $rpl_only_running_threads= 1
source include/stop_slave.inc; source include/stop_slave.inc;
source include/start_slave.inc; source include/start_slave.inc;
......
...@@ -75,17 +75,26 @@ EOF ...@@ -75,17 +75,26 @@ EOF
--connection server_1 --connection server_1
DROP TABLE t1; DROP TABLE t1;
# Slaves IO thread will receive the disconnect error when master was shutdown
# so we are allowing error on start.
--connection server_2 --connection server_2
--disable_warnings --disable_warnings
--let rpl_allow_error=1
--source include/wait_for_slave_io_to_start.inc
--source include/start_slave.inc --source include/start_slave.inc
--enable_warnings --enable_warnings
--connection server_3 --connection server_3
--disable_warnings --disable_warnings
--let rpl_allow_error=1
--source include/wait_for_slave_io_to_start.inc
--source include/start_slave.inc --source include/start_slave.inc
--enable_warnings --enable_warnings
--connection server_4 --connection server_4
--disable_warnings --disable_warnings
--let rpl_allow_error=1
--source include/wait_for_slave_io_to_start.inc
--source include/start_slave.inc --source include/start_slave.inc
--enable_warnings --enable_warnings
...@@ -207,6 +207,7 @@ START SLAVE; ...@@ -207,6 +207,7 @@ START SLAVE;
--let $status_items= Last_IO_Errno, Last_IO_Error --let $status_items= Last_IO_Errno, Last_IO_Error
--source include/show_slave_status.inc --source include/show_slave_status.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
RESET SLAVE; RESET SLAVE;
......
...@@ -82,7 +82,9 @@ connection slave; ...@@ -82,7 +82,9 @@ connection slave;
# slave will catch the killed status, won't shut down immediately # slave will catch the killed status, won't shut down immediately
# but does it eventually having the whole group unfinished (not committed) # but does it eventually having the whole group unfinished (not committed)
source include/wait_for_slave_sql_to_stop.inc; # ER_SLAVE_FATAL_ERROR
--let slave_sql_errno= 1593
source include/wait_for_slave_sql_error.inc;
# checking: the error and group unfinished # checking: the error and group unfinished
...@@ -120,7 +122,8 @@ connection slave; ...@@ -120,7 +122,8 @@ connection slave;
# but does it eventually having the whole group unfinished (not committed) # but does it eventually having the whole group unfinished (not committed)
# #
source include/wait_for_slave_sql_to_stop.inc; --let slave_sql_errno= 1593
source include/wait_for_slave_sql_error.inc;
# checking: the error and group unfinished # checking: the error and group unfinished
......
...@@ -38,8 +38,8 @@ connection master; ...@@ -38,8 +38,8 @@ connection master;
include/rpl_start_server.inc [server_number=1] include/rpl_start_server.inc [server_number=1]
# Master has restarted successfully # Master has restarted successfully
connection slave; connection slave;
include/stop_slave.inc include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/wait_for_slave_sql_to_start.inc
select * from ti; select * from ti;
a a
1 1
......
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection slave; connection slave;
CALL mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: Debug Induced Error");
set @old_dbug=@@global.debug_dbug; set @old_dbug=@@global.debug_dbug;
set global debug_dbug='d,fail_com_register_slave'; set global debug_dbug='d,fail_com_register_slave';
stop slave; stop slave;
reset slave; reset slave;
include/wait_for_slave_to_stop.inc include/wait_for_slave_to_stop.inc
start slave; start slave;
stop slave; include/wait_for_slave_io_error.inc [errno=1597]
include/wait_for_slave_to_stop.inc include/stop_slave_sql.inc
set global debug_dbug=@old_dbug; set global debug_dbug=@old_dbug;
connection master; connection master;
kill DUMP_THREAD; kill DUMP_THREAD;
......
...@@ -52,7 +52,7 @@ Waiting until 'Slave_IO_Running' = 'Yes' [$slave_error_param='Last_IO_Errno'] ...@@ -52,7 +52,7 @@ Waiting until 'Slave_IO_Running' = 'Yes' [$slave_error_param='Last_IO_Errno']
.. con='slave' warn='1' qlog='1' rlog='1' aborterr='1' .. con='slave' warn='1' qlog='1' rlog='1' aborterr='1'
...==== BEGIN include/wait_for_slave_param.inc [Slave_SQL_Running] ==== ...==== BEGIN include/wait_for_slave_param.inc [Slave_SQL_Running] ====
... con='slave' warn='1' qlog='1' rlog='1' aborterr='1' ... con='slave' warn='1' qlog='1' rlog='1' aborterr='1'
Waiting until 'Slave_SQL_Running' = 'Yes' [$slave_error_param='1'] Waiting until 'Slave_SQL_Running' = 'Yes' [$slave_error_param='']
[connection slave] [connection slave]
...==== END include/wait_for_slave_param.inc [Slave_SQL_Running] ==== ...==== END include/wait_for_slave_param.inc [Slave_SQL_Running] ====
... con='slave' warn='1' qlog='1' rlog='1' aborterr='1' ... con='slave' warn='1' qlog='1' rlog='1' aborterr='1'
......
...@@ -30,7 +30,7 @@ a b c ...@@ -30,7 +30,7 @@ a b c
1 1 1 1 1 1
2 2 3 2 2 3
stop slave; stop slave;
include/wait_for_slave_to_stop.inc include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
...@@ -190,7 +190,7 @@ a b c ...@@ -190,7 +190,7 @@ a b c
1 1 1 1 1 1
2 2 3 2 2 3
stop slave; stop slave;
include/wait_for_slave_to_stop.inc include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
......
...@@ -896,7 +896,6 @@ connection con2; ...@@ -896,7 +896,6 @@ connection con2;
SET debug_sync='RESET'; SET debug_sync='RESET';
connection server_2; connection server_2;
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t3 WHERE a >= 110 ORDER BY a; SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
a b a b
110 1 110 1
......
...@@ -35,6 +35,7 @@ connection server_2; ...@@ -35,6 +35,7 @@ connection server_2;
connection con_temp2; connection con_temp2;
COMMIT; COMMIT;
connection server_2; connection server_2;
include/wait_for_slave_sql_error.inc [errno=1062]
include/stop_slave.inc include/stop_slave.inc
include/assert.inc [table t1 should have zero rows where a>32] include/assert.inc [table t1 should have zero rows where a>32]
SELECT * FROM t1 WHERE a>32; SELECT * FROM t1 WHERE a>32;
......
...@@ -30,7 +30,7 @@ kill $t3_tid; ...@@ -30,7 +30,7 @@ kill $t3_tid;
connection slave1; connection slave1;
commit; commit;
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
update t1 set a=1 where a=2; update t1 set a=1 where a=2;
set @@global.slave_parallel_threads = @save.slave_parallel_threads; set @@global.slave_parallel_threads = @save.slave_parallel_threads;
set @@global.slave_parallel_mode = @save.slave_parallel_mode; set @@global.slave_parallel_mode = @save.slave_parallel_mode;
...@@ -78,7 +78,7 @@ include/wait_for_slave_param.inc [Last_Errno] ...@@ -78,7 +78,7 @@ include/wait_for_slave_param.inc [Last_Errno]
connection slave1; connection slave1;
commit; commit;
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
update t1 set a=1 where a=2; update t1 set a=1 where a=2;
set @@global.slave_parallel_threads = @save.slave_parallel_threads; set @@global.slave_parallel_threads = @save.slave_parallel_threads;
set @@global.slave_parallel_mode = @save.slave_parallel_mode; set @@global.slave_parallel_mode = @save.slave_parallel_mode;
...@@ -127,7 +127,7 @@ include/wait_for_slave_param.inc [Last_Errno] ...@@ -127,7 +127,7 @@ include/wait_for_slave_param.inc [Last_Errno]
connection slave1; connection slave1;
commit; commit;
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
update t1 set a=1 where a=2; update t1 set a=1 where a=2;
set @@global.slave_parallel_threads = @save.slave_parallel_threads; set @@global.slave_parallel_threads = @save.slave_parallel_threads;
set @@global.slave_parallel_mode = @save.slave_parallel_mode; set @@global.slave_parallel_mode = @save.slave_parallel_mode;
......
...@@ -89,7 +89,7 @@ b ...@@ -89,7 +89,7 @@ b
3 3
*** slave must stop (Trying to delete a referenced foreing key) *** slave must stop (Trying to delete a referenced foreing key)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1451]
Last_SQL_Error Last_SQL_Error
1451 1451
select * from ti1 order by b /* must be (1),(2),(3) - not deleted */; select * from ti1 order by b /* must be (1),(2),(3) - not deleted */;
...@@ -114,7 +114,7 @@ connection master; ...@@ -114,7 +114,7 @@ connection master;
insert into ti2 set a=3, b=3 /* offending write event */; insert into ti2 set a=3, b=3 /* offending write event */;
*** slave must stop (Trying to insert an invalid foreign key) *** slave must stop (Trying to insert an invalid foreign key)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1452]
Last_SQL_Error Last_SQL_Error
1452 1452
select * from ti2 order by b /* must be (2,2) */; select * from ti2 order by b /* must be (2,2) */;
...@@ -139,9 +139,9 @@ a b ...@@ -139,9 +139,9 @@ a b
insert into ti1 set b=1; insert into ti1 set b=1;
connection master; connection master;
insert into ti1 set b=1 /* offending write event */; insert into ti1 set b=1 /* offending write event */;
*** slave must stop (Trying to insert a dupliacte key) *** slave must stop (Trying to insert a duplicate key)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error Last_SQL_Error
1062 1062
set foreign_key_checks= 0; set foreign_key_checks= 0;
...@@ -164,7 +164,7 @@ connection master; ...@@ -164,7 +164,7 @@ connection master;
DELETE FROM t1 WHERE a = -2; DELETE FROM t1 WHERE a = -2;
*** slave must stop (Key was not found) *** slave must stop (Key was not found)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error Last_SQL_Error
1032 1032
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
...@@ -176,7 +176,7 @@ connection master; ...@@ -176,7 +176,7 @@ connection master;
DELETE FROM t2 WHERE a = -2; DELETE FROM t2 WHERE a = -2;
*** slave must stop (Key was not found) *** slave must stop (Key was not found)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error Last_SQL_Error
1032 1032
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
...@@ -190,7 +190,7 @@ connection master; ...@@ -190,7 +190,7 @@ connection master;
UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1;
*** slave must stop (Key was not found) *** slave must stop (Key was not found)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error Last_SQL_Error
1032 1032
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
...@@ -202,7 +202,7 @@ connection master; ...@@ -202,7 +202,7 @@ connection master;
UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1;
*** slave must stop (Key was not found) *** slave must stop (Key was not found)
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error Last_SQL_Error
1032 1032
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
......
...@@ -14,14 +14,12 @@ connection master; ...@@ -14,14 +14,12 @@ connection master;
# Shutdown master # Shutdown master
include/rpl_stop_server.inc [server_number=1] include/rpl_stop_server.inc [server_number=1]
connection slave; connection slave;
include/stop_slave.inc include/wait_for_slave_io_error.inc [errno=2003]
# Restart master # Restart master
include/rpl_start_server.inc [server_number=1] include/rpl_start_server.inc [server_number=1]
connection slave; connection slave;
include/stop_slave.inc include/wait_for_slave_sql_to_start.inc
Warnings: include/wait_for_slave_io_to_start.inc
Note 1255 Slave already has been stopped
include/start_slave.inc
connection master; connection master;
SET @@GLOBAL.debug_dbug=""; SET @@GLOBAL.debug_dbug="";
SET @@GLOBAL. rpl_semi_sync_master_enabled = 0; SET @@GLOBAL. rpl_semi_sync_master_enabled = 0;
......
...@@ -34,10 +34,13 @@ connection server_1; ...@@ -34,10 +34,13 @@ connection server_1;
connection server_1; connection server_1;
DROP TABLE t1; DROP TABLE t1;
connection server_2; connection server_2;
include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/start_slave.inc
connection server_3; connection server_3;
include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/start_slave.inc
connection server_4; connection server_4;
include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/start_slave.inc
connection server_2; connection server_2;
include/stop_slave.inc include/stop_slave.inc
......
...@@ -21,9 +21,12 @@ connection server_1; ...@@ -21,9 +21,12 @@ connection server_1;
connection server_1; connection server_1;
DROP TABLE t1; DROP TABLE t1;
connection server_2; connection server_2;
include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/start_slave.inc
connection server_3; connection server_3;
include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/start_slave.inc
connection server_4; connection server_4;
include/wait_for_slave_io_to_start.inc
include/start_slave.inc include/start_slave.inc
include/rpl_end.inc include/rpl_end.inc
...@@ -36,7 +36,6 @@ connection slave; ...@@ -36,7 +36,6 @@ connection slave;
include/stop_slave.inc include/stop_slave.inc
START SLAVE; START SLAVE;
include/wait_for_slave_sql_to_start.inc include/wait_for_slave_sql_to_start.inc
include/wait_for_slave_io_to_stop.inc
==== Verify that Slave IO thread stopped with error ==== ==== Verify that Slave IO thread stopped with error ====
include/wait_for_slave_io_error.inc [errno=1045] include/wait_for_slave_io_error.inc [errno=1045]
==== Cleanup (Note that slave IO thread is not running) ==== ==== Cleanup (Note that slave IO thread is not running) ====
......
...@@ -15,7 +15,7 @@ connection slave; ...@@ -15,7 +15,7 @@ connection slave;
select * from t1; select * from t1;
t t
stop slave; stop slave;
include/wait_for_slave_to_stop.inc include/wait_for_slave_io_error.inc [errno=1045]
change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem';
start slave; start slave;
include/wait_for_slave_to_start.inc include/wait_for_slave_to_start.inc
......
...@@ -43,7 +43,7 @@ Warnings: ...@@ -43,7 +43,7 @@ Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction
commit; commit;
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1593]
SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`; SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
Last_SQL_Error true Last_SQL_Error true
Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1 Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
...@@ -63,7 +63,7 @@ set @@global.debug_dbug="d,stop_slave_middle_group,incomplete_group_in_relay_log ...@@ -63,7 +63,7 @@ set @@global.debug_dbug="d,stop_slave_middle_group,incomplete_group_in_relay_log
connection master; connection master;
update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2; update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;
connection slave; connection slave;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_error.inc [errno=1593]
SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`; SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
Last_SQL_Error true Last_SQL_Error true
Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1 Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
......
...@@ -81,6 +81,7 @@ DROP TABLE t1; ...@@ -81,6 +81,7 @@ DROP TABLE t1;
--connection slave --connection slave
--echo # --echo #
--echo # Cleanup --echo # Cleanup
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
eval set @@global.slave_parallel_threads= $save_slave_parallel_threads; eval set @@global.slave_parallel_threads= $save_slave_parallel_threads;
eval set @@global.slave_parallel_mode= $save_slave_parallel_mode; eval set @@global.slave_parallel_mode= $save_slave_parallel_mode;
......
...@@ -16,6 +16,7 @@ CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= ''; ...@@ -16,6 +16,7 @@ CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= '';
START SLAVE; START SLAVE;
--let $slave_io_errno= 1045, 1593 --let $slave_io_errno= 1045, 1593
--source include/wait_for_slave_io_error.inc --source include/wait_for_slave_io_error.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= ''; CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
......
...@@ -149,7 +149,7 @@ connection slave; ...@@ -149,7 +149,7 @@ connection slave;
SELECT * FROM t1; SELECT * FROM t1;
SET @@global.debug_dbug=@saved_dbug; SET @@global.debug_dbug=@saved_dbug;
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
let $do_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1); let $do_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1); let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
......
...@@ -67,8 +67,10 @@ connection master; ...@@ -67,8 +67,10 @@ connection master;
save_master_pos; save_master_pos;
--connection slave --connection slave
--source include/stop_slave.inc --let rpl_allow_error=1
--source include/start_slave.inc --source include/wait_for_slave_io_to_start.inc
--let rpl_allow_error=
--source include/wait_for_slave_sql_to_start.inc
sync_with_master; sync_with_master;
select * from ti; select * from ti;
select * from tm; select * from tm;
......
...@@ -3,7 +3,7 @@ source include/have_binlog_format_mixed.inc; ...@@ -3,7 +3,7 @@ source include/have_binlog_format_mixed.inc;
source include/master-slave.inc; source include/master-slave.inc;
connection slave; connection slave;
CALL mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: Debug Induced Error");
set @old_dbug=@@global.debug_dbug; set @old_dbug=@@global.debug_dbug;
set global debug_dbug='d,fail_com_register_slave'; set global debug_dbug='d,fail_com_register_slave';
...@@ -11,8 +11,11 @@ stop slave; ...@@ -11,8 +11,11 @@ stop slave;
reset slave; reset slave;
source include/wait_for_slave_to_stop.inc; source include/wait_for_slave_to_stop.inc;
start slave; start slave;
stop slave; # Debug point will raise IO thread error ER_SLAVE_MASTER_COM_FAILURE
source include/wait_for_slave_to_stop.inc; # so we will wait for that and manually stop the SQL thread
--let $slave_io_errno= 1597
--source include/wait_for_slave_io_error.inc
--source include/stop_slave_sql.inc
set global debug_dbug=@old_dbug; set global debug_dbug=@old_dbug;
connection master; connection master;
......
...@@ -19,7 +19,7 @@ INSERT INTO t1 VALUES (1); ...@@ -19,7 +19,7 @@ INSERT INTO t1 VALUES (1);
CALL mtr.add_suppression("Slave: Failed to open mysql.gtid_slave_pos"); CALL mtr.add_suppression("Slave: Failed to open mysql.gtid_slave_pos");
--let $slave_sql_errno=1944 --let $slave_sql_errno=1944
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
ALTER TABLE mysql.gtid_slave_pos CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL; ALTER TABLE mysql.gtid_slave_pos CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL;
ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY; ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY;
......
...@@ -31,7 +31,7 @@ SET sql_log_bin=1; ...@@ -31,7 +31,7 @@ SET sql_log_bin=1;
START SLAVE; START SLAVE;
--let $slave_sql_errno=1062 --let $slave_sql_errno=1062
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
# Skip the problem event from the master. # Skip the problem event from the master.
SET GLOBAL gtid_slave_pos= "0-1-100"; SET GLOBAL gtid_slave_pos= "0-1-100";
......
...@@ -50,6 +50,7 @@ eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, ...@@ -50,6 +50,7 @@ eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
START SLAVE; START SLAVE;
--let $slave_io_errno= 1236 --let $slave_io_errno= 1236
--source include/wait_for_slave_io_error.inc --source include/wait_for_slave_io_error.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
......
...@@ -207,7 +207,7 @@ SET sql_log_bin=0; ...@@ -207,7 +207,7 @@ SET sql_log_bin=0;
call mtr.add_suppression("Failed to load slave replication state from table"); call mtr.add_suppression("Failed to load slave replication state from table");
call mtr.add_suppression("Unable to load replication GTID slave state"); call mtr.add_suppression("Unable to load replication GTID slave state");
SET sql_log_bin=1; SET sql_log_bin=1;
--let rpl_allow_error= 1
--source include/start_slave.inc --source include/start_slave.inc
--connection server_1 --connection server_1
INSERT INTO t1 VALUES (9); INSERT INTO t1 VALUES (9);
......
...@@ -327,6 +327,7 @@ sleep 4; ...@@ -327,6 +327,7 @@ sleep 4;
let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1); let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1);
--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result --echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
DROP TABLE t1; DROP TABLE t1;
--echo --echo
......
...@@ -41,7 +41,8 @@ SELECT * FROM t1; ...@@ -41,7 +41,8 @@ SELECT * FROM t1;
# restart replication for the next testcase # restart replication for the next testcase
stop slave; stop slave;
--source include/wait_for_slave_to_stop.inc --let $rpl_only_running_threads= 1
--source include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
...@@ -160,7 +161,8 @@ SELECT * FROM t1; ...@@ -160,7 +161,8 @@ SELECT * FROM t1;
# restart replication for the next testcase # restart replication for the next testcase
stop slave; stop slave;
--source include/wait_for_slave_to_stop.inc --let $rpl_only_running_threads= 1
--source include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
......
...@@ -1175,9 +1175,9 @@ SET debug_sync='RESET'; ...@@ -1175,9 +1175,9 @@ SET debug_sync='RESET';
--save_master_pos --save_master_pos
--connection server_2 --connection server_2
# SQL thread stopped
--let $slave_sql_errno= 1062 --let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--source include/wait_for_slave_sql_to_stop.inc
# We should not see the row (112,3) here, it should be rolled back due to # We should not see the row (112,3) here, it should be rolled back due to
# error signal from the prior transaction. # error signal from the prior transaction.
SELECT * FROM t3 WHERE a >= 110 ORDER BY a; SELECT * FROM t3 WHERE a >= 110 ORDER BY a;
......
...@@ -93,6 +93,9 @@ COMMIT; ...@@ -93,6 +93,9 @@ COMMIT;
# Clean up. # Clean up.
--connection server_2 --connection server_2
--let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
--let $assert_cond= COUNT(*) = 0 FROM t1 WHERE a>32 --let $assert_cond= COUNT(*) = 0 FROM t1 WHERE a>32
--let $assert_text= table t1 should have zero rows where a>32 --let $assert_text= table t1 should have zero rows where a>32
......
...@@ -469,6 +469,7 @@ if (`SELECT count(*) = 1 FROM t1 WHERE a = 2`) ...@@ -469,6 +469,7 @@ if (`SELECT count(*) = 1 FROM t1 WHERE a = 2`)
# Clean up # Clean up
# #
--connection server_2 --connection server_2
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
SET @@GLOBAL.slave_parallel_threads=@old_parallel_threads; SET @@GLOBAL.slave_parallel_threads=@old_parallel_threads;
SET @@GLOBAL.slave_parallel_mode=@old_parallel_mode; SET @@GLOBAL.slave_parallel_mode=@old_parallel_mode;
......
...@@ -39,6 +39,7 @@ SET @@global.debug_dbug="d,inject_tblmap_same_id_maps_diff_table"; ...@@ -39,6 +39,7 @@ SET @@global.debug_dbug="d,inject_tblmap_same_id_maps_diff_table";
# wait for error 1593 (ER_SLAVE_FATAL_ERROR) # wait for error 1593 (ER_SLAVE_FATAL_ERROR)
--let $slave_sql_errno=1593 --let $slave_sql_errno=1593
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
# clean up # clean up
......
...@@ -139,7 +139,9 @@ select * from ti1 order by b /* must be (2),(3) */; ...@@ -139,7 +139,9 @@ select * from ti1 order by b /* must be (2),(3) */;
--echo *** slave must stop (Trying to delete a referenced foreing key) --echo *** slave must stop (Trying to delete a referenced foreing key)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_ROW_IS_REFERENCED_2 # Cannot add or update a child row: a foreign key constraint fails
--let slave_sql_errno= 1451
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
...@@ -173,7 +175,9 @@ insert into ti2 set a=3, b=3 /* offending write event */; ...@@ -173,7 +175,9 @@ insert into ti2 set a=3, b=3 /* offending write event */;
--echo *** slave must stop (Trying to insert an invalid foreign key) --echo *** slave must stop (Trying to insert an invalid foreign key)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_NO_REFERENCED_ROW_2 # Cannot add or update a parent row: a foreign key constraint fails
--let slave_sql_errno= 1452
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
...@@ -210,9 +214,11 @@ insert into ti1 set b=1; ...@@ -210,9 +214,11 @@ insert into ti1 set b=1;
connection master; connection master;
insert into ti1 set b=1 /* offending write event */; insert into ti1 set b=1 /* offending write event */;
--echo *** slave must stop (Trying to insert a dupliacte key) --echo *** slave must stop (Trying to insert a duplicate key)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_DUP_ENTRY # Duplicate entry for key
--let slave_sql_errno= 1062
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
...@@ -247,7 +253,10 @@ DELETE FROM t1 WHERE a = -2; ...@@ -247,7 +253,10 @@ DELETE FROM t1 WHERE a = -2;
--echo *** slave must stop (Key was not found) --echo *** slave must stop (Key was not found)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_KEY_NOT_FOUND # Can't find record
--let slave_sql_errno= 1032
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
...@@ -265,7 +274,9 @@ connection master; ...@@ -265,7 +274,9 @@ connection master;
DELETE FROM t2 WHERE a = -2; DELETE FROM t2 WHERE a = -2;
--echo *** slave must stop (Key was not found) --echo *** slave must stop (Key was not found)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_KEY_NOT_FOUND # Can't find record
--let slave_sql_errno= 1032
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
...@@ -287,7 +298,9 @@ UPDATE t1 SET a = 1 WHERE a = -1; ...@@ -287,7 +298,9 @@ UPDATE t1 SET a = 1 WHERE a = -1;
--echo *** slave must stop (Key was not found) --echo *** slave must stop (Key was not found)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_KEY_NOT_FOUND # Can't find record
--let slave_sql_errno= 1032
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
...@@ -307,7 +320,9 @@ UPDATE t2 SET a = 1 WHERE a = -1; ...@@ -307,7 +320,9 @@ UPDATE t2 SET a = 1 WHERE a = -1;
--echo *** slave must stop (Key was not found) --echo *** slave must stop (Key was not found)
connection slave; connection slave;
source include/wait_for_slave_sql_to_stop.inc; # ER_KEY_NOT_FOUND # Can't find record
--let slave_sql_errno= 1032
source include/wait_for_slave_sql_error.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
......
...@@ -30,8 +30,12 @@ connection master; ...@@ -30,8 +30,12 @@ connection master;
--let $rpl_server_number=1 --let $rpl_server_number=1
source include/rpl_stop_server.inc; source include/rpl_stop_server.inc;
# After stoping the master, slave receives the disconnect error (2003)
--connection slave --connection slave
--source include/stop_slave.inc --let $slave_io_errno=2003
--let $slave_io_error_is_nonfatal=1
--source include/wait_for_slave_io_error.inc
--let $slave_io_error_is_nonfatal=0
#connection master; #connection master;
--echo # Restart master --echo # Restart master
...@@ -42,8 +46,10 @@ source include/rpl_start_server.inc; ...@@ -42,8 +46,10 @@ source include/rpl_start_server.inc;
# Clean up # Clean up
# #
--connection slave --connection slave
--source include/stop_slave.inc --source include/wait_for_slave_sql_to_start.inc
--source include/start_slave.inc --let rpl_allow_error=1
--source include/wait_for_slave_io_to_start.inc
#--source include/start_slave.inc
--connection master --connection master
SET @@GLOBAL.debug_dbug=""; SET @@GLOBAL.debug_dbug="";
......
...@@ -116,11 +116,13 @@ show status like 'Rpl_semi_sync_master_no_tx'; ...@@ -116,11 +116,13 @@ show status like 'Rpl_semi_sync_master_no_tx';
--connection server_2 --connection server_2
--eval SET @@GLOBAL.debug_dbug= "$sav_server_2_dbug" --eval SET @@GLOBAL.debug_dbug= "$sav_server_2_dbug"
--eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0 --eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0
--let $rpl_only_running_threads= 1
source include/stop_slave.inc; source include/stop_slave.inc;
--connection server_3 --connection server_3
--eval SET @@GLOBAL.debug_dbug= "$sav_server_3_dbug" --eval SET @@GLOBAL.debug_dbug= "$sav_server_3_dbug"
--eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0 --eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0
--let $rpl_only_running_threads= 1
source include/stop_slave.inc; source include/stop_slave.inc;
--echo #-- Bring the master back up --echo #-- Bring the master back up
......
...@@ -59,7 +59,6 @@ sync_slave_with_master; ...@@ -59,7 +59,6 @@ sync_slave_with_master;
source include/stop_slave.inc; source include/stop_slave.inc;
START SLAVE; START SLAVE;
source include/wait_for_slave_sql_to_start.inc; source include/wait_for_slave_sql_to_start.inc;
source include/wait_for_slave_io_to_stop.inc;
--echo ==== Verify that Slave IO thread stopped with error ==== --echo ==== Verify that Slave IO thread stopped with error ====
# 1045 = ER_ACCESS_DENIED_ERROR # 1045 = ER_ACCESS_DENIED_ERROR
...@@ -68,7 +67,7 @@ source include/wait_for_slave_io_to_stop.inc; ...@@ -68,7 +67,7 @@ source include/wait_for_slave_io_to_stop.inc;
--echo ==== Cleanup (Note that slave IO thread is not running) ==== --echo ==== Cleanup (Note that slave IO thread is not running) ====
# cleanup: slave io thread has is stopped so we reset replication # cleanup: slave io thread is stopped so we reset replication
--source include/stop_slave_sql.inc --source include/stop_slave_sql.inc
CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = ''; CHANGE MASTER TO MASTER_USER = 'root', MASTER_PASSWORD = '';
# clear Slave_IO_Errno # clear Slave_IO_Errno
......
...@@ -30,7 +30,9 @@ select * from t1; ...@@ -30,7 +30,9 @@ select * from t1;
#showing that replication could work with ssl params #showing that replication could work with ssl params
stop slave; stop slave;
--source include/wait_for_slave_to_stop.inc --let $slave_io_errno=1045
--source include/wait_for_slave_io_error.inc
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
start slave; start slave;
......
...@@ -19,6 +19,7 @@ insert into t1 values (1); ...@@ -19,6 +19,7 @@ insert into t1 values (1);
reset master; reset master;
--connection slave --connection slave
--let $rpl_only_running_threads= 1
--source include/stop_slave.inc --source include/stop_slave.inc
reset slave; reset slave;
--source include/start_slave.inc --source include/start_slave.inc
......
...@@ -4775,7 +4775,13 @@ pthread_handler_t handle_slave_io(void *arg) ...@@ -4775,7 +4775,13 @@ pthread_handler_t handle_slave_io(void *arg)
goto err; goto err;
goto connected; goto connected;
} }
DBUG_EXECUTE_IF("fail_com_register_slave", goto err;); DBUG_EXECUTE_IF("fail_com_register_slave",
{
mi->report(ERROR_LEVEL, ER_SLAVE_MASTER_COM_FAILURE, NULL,
ER(ER_SLAVE_MASTER_COM_FAILURE), "COM_REGISTER_SLAVE",
"Debug Induced Error");
goto err;
});
} }
DBUG_PRINT("info",("Starting reading binary log from master")); DBUG_PRINT("info",("Starting reading binary log from master"));
......
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