mariadb/mysql-test/t/rpl_get_lock.test

37 lines
757 B
Text
Raw Normal View History

2001-08-31 23:55:58 +02:00
source include/master-slave.inc;
2001-08-31 23:55:58 +02:00
create table t1(n int);
insert into t1 values(get_lock("lock",2));
dirty_close master;
connection master1;
2001-12-14 01:21:04 +01:00
select get_lock("lock",2);
select release_lock("lock");
#ignore
disable_query_log;
let $1=2000;
2001-12-19 03:53:56 +01:00
while ($1)
{
do get_lock("lock",2);
do release_lock("lock");
2001-12-19 03:53:56 +01:00
dec $1;
}
enable_query_log;
2001-08-31 23:55:58 +02:00
save_master_pos;
connection slave;
sync_with_master;
select get_lock("lock",3);
select * from t1;
select is_free_lock("lock"), is_used_lock("lock") = connection_id();
explain extended select is_free_lock("lock"), is_used_lock("lock");
# Check lock functions
select is_free_lock("lock2");
select is_free_lock(NULL);
2001-08-31 23:55:58 +02:00
connection master1;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;
# End of 4.1 tests