2001-08-31 15:55:58 -06:00
|
|
|
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;
|
2001-12-13 17:21:04 -07:00
|
|
|
select get_lock("lock",2);
|
2001-12-12 18:55:33 -07:00
|
|
|
select release_lock("lock");
|
2001-12-18 21:56:36 -07:00
|
|
|
let $1=2000;
|
2001-12-18 19:53:56 -07:00
|
|
|
while ($1)
|
|
|
|
{
|
2001-12-18 21:56:36 -07:00
|
|
|
do get_lock("lock",2);
|
|
|
|
do release_lock("lock");
|
2001-12-18 19:53:56 -07:00
|
|
|
dec $1;
|
|
|
|
}
|
2001-08-31 15:55:58 -06:00
|
|
|
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;
|