~vkolesnikov/pbxt/pbxt-07-diskfull

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/t/rpl_change_master.test

  • Committer: paul-mccullagh
  • Date: 2006-10-23 09:14:04 UTC
  • Revision ID: paul-mccullagh-918861e03d351978a9541168a96e58cc826734ee
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Verify that after CHANGE MASTER, replication (I/O thread and SQL
 
2
# thread) restart from where SQL thread left, not from where
 
3
# I/O thread left (some old bug fixed in 4.0.17)
 
4
 
 
5
source include/master-slave.inc;
 
6
 
 
7
connection master;
 
8
# Make SQL slave thread advance a bit
 
9
create table t1(n int);
 
10
sync_slave_with_master;
 
11
select * from t1;
 
12
# Now stop it and make I/O slave thread be ahead
 
13
stop slave sql_thread;
 
14
connection master;
 
15
insert into t1 values(1);
 
16
insert into t1 values(2);
 
17
save_master_pos;
 
18
connection slave;
 
19
--real_sleep 3 # wait for I/O thread to have read updates
 
20
stop slave;
 
21
--replace_result $MASTER_MYPORT MASTER_MYPORT
 
22
--replace_column 1 # 7 # 8 # 9 # 23 # 33 #
 
23
show slave status;
 
24
change master to master_user='root';
 
25
--replace_result $MASTER_MYPORT MASTER_MYPORT
 
26
--replace_column 1 # 7 # 8 # 9 # 23 # 33 #
 
27
show slave status;
 
28
start slave;
 
29
sync_with_master;
 
30
select * from t1;
 
31
connection master;
 
32
drop table t1;
 
33
save_master_pos;
 
34
connection slave;
 
35
sync_with_master;
 
36
 
 
37
# End of 4.1 tests