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;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-12 23:01:35 +01:00
|
|
|
show slave status;
|
2003-01-04 14:37:20 +01:00
|
|
|
stop slave;
|
2000-12-12 23:01:35 +01:00
|
|
|
change master to master_log_pos=73;
|
2003-01-04 14:37:20 +01:00
|
|
|
start slave;
|
2002-08-24 04:44:16 +02:00
|
|
|
sleep 5;
|
2002-10-25 01:46:14 +02:00
|
|
|
stop slave;
|
2002-03-16 02:44:44 +01:00
|
|
|
|
2000-12-12 23:01:35 +01:00
|
|
|
change master to master_log_pos=73;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-12 23:01:35 +01:00
|
|
|
show slave status;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2002-08-24 04:44:16 +02:00
|
|
|
sleep 5;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-12 23:01:35 +01:00
|
|
|
show slave status;
|
2003-01-04 14:37:20 +01:00
|
|
|
stop slave;
|
2000-12-12 23:01:35 +01:00
|
|
|
change master to master_log_pos=173;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2002-08-21 21:04:22 +02:00
|
|
|
sleep 2;
|
2002-10-02 12:33:08 +02:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-12 23:01:35 +01:00
|
|
|
show slave status;
|
|
|
|
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;
|
2003-01-04 14:37:20 +01:00
|
|
|
stop slave;
|
2001-06-19 23:03:48 +02:00
|
|
|
change master to master_log_pos=79;
|
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;
|