~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_change_master.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

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
let $slave_param= Read_Master_Log_Pos;
 
19
let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
 
20
connection slave;
 
21
source include/wait_for_slave_param.inc;
 
22
stop slave;
 
23
source include/show_slave_status2.inc;
 
24
change master to master_user='root';
 
25
source include/show_slave_status2.inc;
 
26
start slave;
 
27
sync_with_master;
 
28
select * from t1;
 
29
connection master;
 
30
drop table t1;
 
31
save_master_pos;
 
32
connection slave;
 
33
sync_with_master;
 
34
 
 
35
# End of 4.1 tests