mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
816dc4eb28
* binary XOR * logical XOR * CHECK_LOCK("lock_name")
29 lines
564 B
Text
29 lines
564 B
Text
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;
|
|
select get_lock("lock",2);
|
|
select release_lock("lock");
|
|
#ignore
|
|
disable_query_log;
|
|
let $1=2000;
|
|
while ($1)
|
|
{
|
|
do get_lock("lock",2);
|
|
do release_lock("lock");
|
|
dec $1;
|
|
}
|
|
enable_query_log;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
select get_lock("lock",3);
|
|
select * from t1;
|
|
connection master1;
|
|
select check_lock("lock");
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|