2002-08-21 21:04:22 +02:00
|
|
|
#
|
|
|
|
# Testing of setting slave to wrong log position with master_log_pos
|
|
|
|
#
|
2000-12-12 23:01:35 +01:00
|
|
|
source include/master-slave.inc;
|
|
|
|
show master status;
|
2002-10-25 01:46:14 +02:00
|
|
|
sync_slave_with_master;
|
2007-06-15 13:09:28 +02:00
|
|
|
|
2002-10-25 01:46:14 +02:00
|
|
|
stop slave;
|
2007-06-15 13:09:28 +02:00
|
|
|
--source include/wait_for_slave_to_stop.inc
|
2002-03-16 02:44:44 +01:00
|
|
|
|
2000-12-12 23:01:35 +01:00
|
|
|
change master to master_log_pos=73;
|
2004-05-10 12:15:40 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2003-12-19 22:40:23 +01:00
|
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
2007-06-15 13:09:28 +02:00
|
|
|
query_vertical show slave status;
|
|
|
|
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2007-06-15 13:09:28 +02:00
|
|
|
let $slave_param= Slave_SQL_Running;
|
|
|
|
let $slave_param_value= Yes;
|
|
|
|
--source include/wait_for_slave_param.inc
|
|
|
|
let $slave_param= Slave_IO_Running;
|
|
|
|
let $slave_param_value= No;
|
|
|
|
--source include/wait_for_slave_param.inc
|
2003-01-04 14:37:20 +01:00
|
|
|
stop slave;
|
2007-06-15 13:09:28 +02:00
|
|
|
--source include/wait_for_slave_to_stop.inc
|
|
|
|
|
2004-05-10 12:15:40 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2003-12-19 22:40:23 +01:00
|
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
2007-06-15 13:09:28 +02:00
|
|
|
query_vertical show slave status;
|
|
|
|
|
2000-12-12 23:01:35 +01:00
|
|
|
connection master;
|
|
|
|
show master status;
|
2002-08-21 21:04:22 +02:00
|
|
|
create table if not exists t1 (n int);
|
|
|
|
drop table if exists t1;
|
|
|
|
create table t1 (n int);
|
|
|
|
insert into t1 values (1),(2),(3);
|
2001-01-17 13:47:33 +01:00
|
|
|
save_master_pos;
|
2000-12-12 23:01:35 +01:00
|
|
|
connection slave;
|
2005-03-16 02:32:47 +01:00
|
|
|
change master to master_log_pos=98;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2001-01-17 13:47:33 +01:00
|
|
|
sync_with_master;
|
2002-08-21 21:04:22 +02:00
|
|
|
select * from t1;
|
2001-01-03 01:15:48 +01:00
|
|
|
connection master;
|
2002-08-21 21:04:22 +02:00
|
|
|
drop table t1;
|
2002-10-25 01:46:14 +02:00
|
|
|
sync_slave_with_master;
|
2005-07-28 02:22:47 +02:00
|
|
|
|
2007-06-15 13:09:28 +02:00
|
|
|
--echo End of 5.0 tests
|