| 1 |
########## |
| 2 |
# Change Author: JBM |
| 3 |
# Change Date: 2006-01-16 |
| 4 |
########## |
| 5 |
|
| 6 |
# |
| 7 |
# Testing of setting slave to wrong log position with master_log_pos |
| 8 |
# |
| 9 |
|
| 10 |
# Passes with rbr no problem, removed statement include [jbm] |
| 11 |
|
| 12 |
source include/master-slave.inc; |
| 13 |
|
| 14 |
# |
| 15 |
# Add an event to get some information into the log we can try to parse |
| 16 |
# |
| 17 |
let $read_pos= query_get_value(SHOW MASTER STATUS, Position, 1); |
| 18 |
create table if not exists t1 (n int); |
| 19 |
drop table t1; |
| 20 |
|
| 21 |
call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); |
| 22 |
call mtr.add_suppression ("Error in Log_event::read_log_event"); |
| 23 |
source include/show_master_status.inc; |
| 24 |
sync_slave_with_master; |
| 25 |
source include/stop_slave.inc; |
| 26 |
|
| 27 |
let $wrong_log_pos= `SELECT $read_pos+2`; |
| 28 |
--replace_result $wrong_log_pos MASTER_LOG_POS |
| 29 |
eval change master to master_log_pos=$wrong_log_pos, master_use_gtid=no; |
| 30 |
start slave; |
| 31 |
let $slave_io_errno= 1236; |
| 32 |
--let $show_slave_io_error= 1 |
| 33 |
# Mask line numbers |
| 34 |
--let $slave_io_error_replace= / at [0-9]*/ at XXX/ |
| 35 |
source include/wait_for_slave_io_error.inc; |
| 36 |
source include/stop_slave_sql.inc; |
| 37 |
--enable_warnings |
| 38 |
|
| 39 |
connection master; |
| 40 |
source include/show_master_status.inc; |
| 41 |
create table if not exists t1 (n int); |
| 42 |
drop table if exists t1; |
| 43 |
create table t1 (n int); |
| 44 |
insert into t1 values (1),(2),(3); |
| 45 |
save_master_pos; |
| 46 |
connection slave; |
| 47 |
--replace_result 4 MASTER_LOG_POS |
| 48 |
change master to master_log_pos=4, master_use_gtid=no; |
| 49 |
start slave; |
| 50 |
sync_with_master; |
| 51 |
select * from t1 ORDER BY n; |
| 52 |
connection master; |
| 53 |
drop table t1; |
| 54 |
sync_slave_with_master; |
| 55 |
|
| 56 |
--echo End of 5.0 tests |
| 57 |
--source include/rpl_end.inc |