Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_slave_replay.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 use test;
7 create table test.t1 (a int primary key, content varchar(1000)) engine=ndb;
8 reset master;
9 STOP REPLICA;
10 CHANGE REPLICATION SOURCE TO SOURCE_LOG_POS=4;
11 START REPLICA;
12 Capture current count of epoch decline warnings
13 insert into test.t1 values (6, repeat('B', 1000));
14 insert into test.t1 values (5, repeat('B', 1000));
15 insert into test.t1 values (4, repeat('B', 1000));
16 insert into test.t1 values (3, repeat('B', 1000));
17 insert into test.t1 values (2, repeat('B', 1000));
18 insert into test.t1 values (1, repeat('B', 1000));
19 Expect that we have at least 2 epochs logged.
20 select count(1) > 1 from
21 (select distinct epoch from mysql.ndb_binlog_index) as logged_epochs;
22 count(1) > 1
23 1
24 Any slave positioning warnings?
25 Should be none
26 lower_warn_count
27 0
28 lower_err_count
29 0
30 repeat_err_count
31 0
32 skipped_err_count
33 0
34 Now stop and manually replay old binlog.
35 STOP REPLICA;
36 CHANGE REPLICATION SOURCE to SOURCE_LOG_POS=4;
37 START REPLICA;
38 Any slave positioning warnings?
39 Should be one
40 lower_warn_count
41 1
42 lower_err_count
43 0
44 repeat_err_count
45 0
46 skipped_err_count
47 0
48 Repeat
49 STOP REPLICA;
50 CHANGE REPLICATION SOURCE to SOURCE_LOG_POS=4;
51 START REPLICA;
52 Any slave positioning warnings?
53 Should be two
54 lower_warn_count
55 2
56 lower_err_count
57 0
58 repeat_err_count
59 0
60 skipped_err_count
61 0
62 Now try re-positioning after RESET SLAVE
63 STOP REPLICA;
64 RESET REPLICA;
65 include/rpl_start_slaves.inc
66 Any slave positioning warnings?
67 Should be two, e.g. no extras after the RESET SLAVE
68 This avoids warnings when slave context has been explicitly reset
69 lower_warn_count
70 2
71 lower_err_count
72 0
73 repeat_err_count
74 0
75 skipped_err_count
76 0
77 Now get unexpected epoch back-step using fault injection
78 on the Master.
79 call mtr.add_suppression("Binlog injector cycling gcis .*");
80 set @old_debug = @@global.debug;
81 set global debug="";
82 set global debug="+d,ndb_binlog_injector_cycle_gcis";
83 show variables like 'debug';
84 Variable_name Value
85 debug d,ndb_binlog_injector_cycle_gcis
86 Let's make some epochs
87 insert into test.t1 values (6 + 6, repeat('E', 1000));
88 insert into test.t1 values (5 + 6, repeat('E', 1000));
89 insert into test.t1 values (4 + 6, repeat('E', 1000));
90 insert into test.t1 values (3 + 6, repeat('E', 1000));
91 insert into test.t1 values (2 + 6, repeat('E', 1000));
92 insert into test.t1 values (1 + 6, repeat('E', 1000));
93 Check that slave stopped with an error
94 include/wait_for_slave_sql_error.inc [errno=1296]
95 Let's look at the warnings and errors now...
96 lower_warn_count
97 2
98 lower_err_count
99 1
100 repeat_err_count
101 0
102 skipped_err_count
103 0
104 Now check that we can manually restart the slave
105 set global debug = @old_debug;
106 reset master;
107 START REPLICA SQL_THREAD UNTIL SQL_AFTER_MTS_GAPS;
108 STOP REPLICA;
109 CHANGE REPLICATION SOURCE to SOURCE_LOG_POS=4;
110 START REPLICA;
111 insert into test.t1 values (13, repeat('A', 1000));
112 Check slave warnings now, should be no extras
113 e.g. 2 warnings, 1 error
114 lower_warn_count
115 2
116 lower_err_count
117 1
118 repeat_err_count
119 0
120 skipped_err_count
121 0
122 delete from test.t1;
123 Now get unexpected epoch repeat using fault-injection on the master
124 call mtr.add_suppression("Binlog injector repeating gcis .*");
125 set @old_debug = @@global.debug;
126 set global debug="";
127 set global debug="+d,ndb_binlog_injector_repeat_gcis";
128 show variables like 'debug';
129 Variable_name Value
130 debug d,ndb_binlog_injector_repeat_gcis
131 Let's make some epochs
132 insert into test.t1 values (6, repeat('E', 1000));
133 insert into test.t1 values (5, repeat('E', 1000));
134 insert into test.t1 values (4, repeat('E', 1000));
135 insert into test.t1 values (3, repeat('E', 1000));
136 insert into test.t1 values (2, repeat('E', 1000));
137 insert into test.t1 values (1, repeat('E', 1000));
138 Check that slave stopped with an error
139 include/wait_for_slave_sql_error.inc [errno=1296]
140 Let's look at the warnings and errors now...
141 Should be increase in repeat error count.
142 lower_warn_count
143 2
144 lower_err_count
145 1
146 repeat_err_count
147 1
148 skipped_err_count
149 0
150 Now check that we can manually restart the slave
151 set global debug = @old_debug;
152 reset master;
153 START REPLICA SQL_THREAD UNTIL SQL_AFTER_MTS_GAPS;
154 STOP REPLICA;
155 CHANGE REPLICATION SOURCE to SOURCE_LOG_POS=4;
156 START REPLICA;
157 insert into test.t1 values (13, repeat('A', 1000));
158 Check slave warnings now, should be no extras
159 lower_warn_count
160 3
161 lower_err_count
162 1
163 repeat_err_count
164 1
165 skipped_err_count
166 0
167 delete from test.t1;
168 Now get skipped epoch using fault injection on the slave
169 set @old_debug = @@global.debug;
170 set global debug="";
171 set global debug="+d,ndb_replica_fail_marking_epoch_committed";
172 show variables like 'debug';
173 Variable_name Value
174 debug d,ndb_replica_fail_marking_epoch_committed
175 Let's make some epochs
176 insert into test.t1 values (6, repeat('E', 1000));
177 insert into test.t1 values (5, repeat('E', 1000));
178 insert into test.t1 values (4, repeat('E', 1000));
179 insert into test.t1 values (3, repeat('E', 1000));
180 insert into test.t1 values (2, repeat('E', 1000));
181 insert into test.t1 values (1, repeat('E', 1000));
182 Check that slave stopped with an error
183 include/wait_for_slave_sql_error.inc [errno=1296]
184 Let's look at the warnings and errors now...
185 Should be increase in repeat error count.
186 lower_warn_count
187 3
188 lower_err_count
189 1
190 repeat_err_count
191 1
192 skipped_err_count
193 1
194 Now check that we can manually restart the slave
195 set global debug = @old_debug;
196 reset master;
197 START REPLICA SQL_THREAD UNTIL SQL_AFTER_MTS_GAPS;
198 STOP REPLICA;
199 CHANGE REPLICATION SOURCE to SOURCE_LOG_POS=4;
200 START REPLICA;
201 insert into test.t1 values (13, repeat('A', 1000));
202 Check slave warnings now, should be no extras
203 lower_warn_count
204 3
205 lower_err_count
206 1
207 repeat_err_count
208 1
209 skipped_err_count
210 1
211 drop table test.server_error_log;
212 drop table test.t1;
213 include/rpl_end.inc