| 1 |
=====Configuring the enviroment=======; |
| 2 |
include/master-slave.inc |
| 3 |
[connection master] |
| 4 |
call mtr.add_suppression('Attempting backtrace'); |
| 5 |
call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); |
| 6 |
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; |
| 7 |
flush tables; |
| 8 |
CREATE TABLE t1(a INT, PRIMARY KEY(a)) engine=innodb; |
| 9 |
insert into t1(a) values(1); |
| 10 |
insert into t1(a) values(2); |
| 11 |
insert into t1(a) values(3); |
| 12 |
=====Inserting data on the master but without the SQL Thread being running=======; |
| 13 |
connection slave; |
| 14 |
connection slave; |
| 15 |
include/stop_slave_sql.inc |
| 16 |
connection master; |
| 17 |
insert into t1(a) values(4); |
| 18 |
insert into t1(a) values(5); |
| 19 |
insert into t1(a) values(6); |
| 20 |
=====Removing relay log files and crashing/recoverying the slave=======; |
| 21 |
connection slave; |
| 22 |
include/stop_slave_io.inc |
| 23 |
SET SESSION debug_dbug="d,crash_before_rotate_relaylog"; |
| 24 |
FLUSH LOGS; |
| 25 |
ERROR HY000: Lost connection to server during query |
| 26 |
include/rpl_reconnect.inc |
| 27 |
=====Dumping and comparing tables=======; |
| 28 |
include/start_slave.inc |
| 29 |
connection master; |
| 30 |
connection slave; |
| 31 |
include/diff_tables.inc [master:t1,slave:t1] |
| 32 |
=====Corrupting the master.info=======; |
| 33 |
connection slave; |
| 34 |
include/stop_slave.inc |
| 35 |
connection master; |
| 36 |
FLUSH LOGS; |
| 37 |
insert into t1(a) values(7); |
| 38 |
insert into t1(a) values(8); |
| 39 |
insert into t1(a) values(9); |
| 40 |
connection slave; |
| 41 |
SET SESSION debug_dbug="d,crash_before_rotate_relaylog"; |
| 42 |
FLUSH LOGS; |
| 43 |
ERROR HY000: Lost connection to server during query |
| 44 |
include/rpl_reconnect.inc |
| 45 |
=====Dumping and comparing tables=======; |
| 46 |
include/start_slave.inc |
| 47 |
connection master; |
| 48 |
connection slave; |
| 49 |
include/diff_tables.inc [master:t1,slave:t1] |
| 50 |
=====Clean up=======; |
| 51 |
connection master; |
| 52 |
drop table t1; |
| 53 |
include/rpl_end.inc |