rpl_get_lock.test 537 Bytes
Newer Older
unknown's avatar
unknown committed
1 2 3 4 5 6
source include/master-slave.inc;
connection master;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
dirty_close master;
connection master1;
unknown's avatar
unknown committed
7
select get_lock("lock",2);
unknown's avatar
unknown committed
8
select release_lock("lock");
unknown's avatar
unknown committed
9 10
#ignore 
disable_query_log;
11
let $1=2000;
unknown's avatar
unknown committed
12 13
while ($1)
{
14 15
  do get_lock("lock",2);
  do release_lock("lock");
unknown's avatar
unknown committed
16 17
  dec $1;
}
unknown's avatar
unknown committed
18
enable_query_log;
unknown's avatar
unknown committed
19 20 21 22 23 24 25 26 27 28
save_master_pos;
connection slave;
sync_with_master;
select get_lock("lock",3);
select * from t1;
connection master1;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;