2001-06-21 21:19:24 +02:00
|
|
|
source include/master-slave.inc;
|
|
|
|
|
|
|
|
#clean up slave binlogs
|
|
|
|
connection slave;
|
2002-10-25 01:46:14 +02:00
|
|
|
stop slave;
|
2001-06-21 21:19:24 +02:00
|
|
|
reset master;
|
2001-06-22 16:35:18 +02:00
|
|
|
reset slave;
|
2001-12-15 03:41:20 +01:00
|
|
|
let $VERSION=`select version()`;
|
2001-06-21 21:19:24 +02:00
|
|
|
|
|
|
|
connection master;
|
2001-06-22 16:35:18 +02:00
|
|
|
reset master;
|
2001-06-21 21:19:24 +02:00
|
|
|
create table t1(n int not null auto_increment primary key);
|
|
|
|
insert into t1 values (NULL);
|
|
|
|
drop table t1;
|
|
|
|
create table t1 (word char(20) not null);
|
|
|
|
load data infile '../../std_data/words.dat' into table t1;
|
|
|
|
drop table t1;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result $VERSION VERSION
|
2001-06-21 21:19:24 +02:00
|
|
|
show binlog events;
|
|
|
|
show binlog events from 79 limit 1;
|
|
|
|
show binlog events from 79 limit 2;
|
|
|
|
show binlog events from 79 limit 2,1;
|
|
|
|
flush logs;
|
2002-09-11 05:40:08 +02:00
|
|
|
|
|
|
|
# Sync slave and force it to start on another binary log
|
|
|
|
|
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2002-09-11 05:40:08 +02:00
|
|
|
sync_with_master;
|
|
|
|
flush logs;
|
2002-10-25 01:46:14 +02:00
|
|
|
stop slave;
|
2002-09-11 05:40:08 +02:00
|
|
|
connection master;
|
|
|
|
|
|
|
|
# Create some entries for second log
|
|
|
|
|
2001-06-24 03:37:24 +02:00
|
|
|
create table t1 (n int);
|
|
|
|
insert into t1 values (1);
|
|
|
|
drop table t1;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result $VERSION VERSION
|
2001-06-21 21:19:24 +02:00
|
|
|
show binlog events;
|
2002-10-29 23:11:13 +01:00
|
|
|
show binlog events in 'master-bin.000002';
|
2002-10-25 02:32:42 +02:00
|
|
|
show binary logs;
|
2001-06-21 21:19:24 +02:00
|
|
|
save_master_pos;
|
|
|
|
connection slave;
|
2002-10-25 01:46:14 +02:00
|
|
|
start slave;
|
2001-06-21 21:19:24 +02:00
|
|
|
sync_with_master;
|
2002-10-25 02:32:42 +02:00
|
|
|
show binary logs;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION
|
2002-10-29 23:11:13 +01:00
|
|
|
show binlog events in 'slave-bin.000001' from 4;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT $VERSION VERSION
|
2002-10-29 23:11:13 +01:00
|
|
|
show binlog events in 'slave-bin.000002' from 4;
|
2001-12-15 03:41:20 +01:00
|
|
|
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
|
2001-06-24 03:37:24 +02:00
|
|
|
show slave status;
|
2002-09-11 05:40:08 +02:00
|
|
|
|
|
|
|
# Need to recode the following
|
|
|
|
|
2002-10-29 23:11:13 +01:00
|
|
|
#show new master for slave with master_log_file='master-bin.000001' and master_log_pos=4 and master_server_id=1;
|
|
|
|
#show new master for slave with master_log_file='master-bin.000001' and master_log_pos=79 and master_server_id=1;
|
|
|
|
#show new master for slave with master_log_file='master-bin.000001' and master_log_pos=311 and master_server_id=1;
|
|
|
|
#show new master for slave with master_log_file='master-bin.000002' and master_log_pos=4 and master_server_id=1;
|
|
|
|
#show new master for slave with master_log_file='master-bin.000002' and master_log_pos=122 and master_server_id=1;
|
2002-09-11 05:40:08 +02:00
|
|
|
|
|
|
|
--error 1220
|
2002-10-29 23:11:13 +01:00
|
|
|
show binlog events in 'slave-bin.000005' from 4;
|