Debian Codegraph @

mysql-test/suite/rpl/t/rpl_bug41902.test

raw
1 # Test for Bug #41902 MYSQL_BIN_LOG::reset_logs() doesn't call my_error()
2 # in face of an error
3 #
4
5 --source include/not_group_replication_plugin.inc
6 source include/have_debug.inc;
7 source include/master-slave.inc;
8
9 -- disable_query_log
10 CALL mtr.add_suppression("Failed to locate old binlog or relay log files");
11 CALL mtr.add_suppression('MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index.');
12 -- enable_query_log
13 --source include/sync_slave_sql_with_master.inc
14
15 #
16 # test checks that
17 # a. there is no crash when find_log_pos() returns with an error
18 # that tests expect to receive;
19 # b. in the case of multiple error messages the first error message is
20 # reported to the user and others are available as warnings.
21 #
22
23 connection slave;
24 stop slave;
25
26 --let $debug_point= simulate_find_log_pos_error
27 --source include/add_debug_point.inc
28
29 --error ER_UNKNOWN_TARGET_BINLOG
30 reset slave;
31 show warnings;
32
33 --let $debug_point= simulate_find_log_pos_error
34 --source include/remove_debug_point.inc
35
36 reset slave;
37 CHANGE REPLICATION SOURCE to SOURCE_HOST='dummy';
38
39 --let $debug_point= simulate_find_log_pos_error
40 --source include/add_debug_point.inc
41
42 --error ER_UNKNOWN_TARGET_BINLOG
43 CHANGE REPLICATION SOURCE to SOURCE_HOST='dummy';
44
45 --let $debug_point= simulate_find_log_pos_error
46 --source include/remove_debug_point.inc
47
48 reset slave;
49 CHANGE REPLICATION SOURCE to SOURCE_HOST='dummy';
50
51 connection master;
52
53 --let $debug_point= simulate_find_log_pos_error
54 --source include/add_debug_point.inc
55
56 --error ER_UNKNOWN_TARGET_BINLOG
57 reset master;
58
59 --let $debug_point= simulate_find_log_pos_error
60 --source include/remove_debug_point.inc
61
62 reset master;
63
64 --let $debug_point= simulate_find_log_pos_error
65 --source include/add_debug_point.inc
66
67 --error ER_UNKNOWN_TARGET_BINLOG
68 purge binary logs to 'master-bin.000001';
69
70 --let $debug_point= simulate_find_log_pos_error
71 --source include/remove_debug_point.inc
72
73 purge binary logs to 'master-bin.000001';
74
75 --echo ==== clean up ====
76 --connection slave
77 CHANGE REPLICATION SOURCE TO SOURCE_HOST = '127.0.0.1';
78 --let $rpl_only_running_threads= 1
79 --source include/rpl_end.inc