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 12source include/master-slave.inc; 13 14# 15# Add an event to get some information into the log we can try to parse 16# 17let $read_pos= query_get_value(SHOW MASTER STATUS, Position, 1); 18create table if not exists t1 (n int); 19drop table t1; 20 21call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); 22call mtr.add_suppression ("Error in Log_event::read_log_event"); 23source include/show_master_status.inc; 24sync_slave_with_master; 25source include/stop_slave.inc; 26 27let $wrong_log_pos= `SELECT $read_pos+2`; 28--replace_result $wrong_log_pos MASTER_LOG_POS 29eval change master to master_log_pos=$wrong_log_pos; 30start slave; 31let $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/ 35source include/wait_for_slave_io_error.inc; 36source include/stop_slave_sql.inc; 37--enable_warnings 38 39connection master; 40source include/show_master_status.inc; 41create table if not exists t1 (n int); 42drop table if exists t1; 43create table t1 (n int); 44insert into t1 values (1),(2),(3); 45save_master_pos; 46connection slave; 47--replace_result 4 MASTER_LOG_POS 48change master to master_log_pos=4; 49start slave; 50sync_with_master; 51select * from t1 ORDER BY n; 52connection master; 53drop table t1; 54sync_slave_with_master; 55 56--echo End of 5.0 tests 57--source include/rpl_end.inc 58