1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
set @count_barrier= "count_barrier";
set @barrier_limit= 6;
SELECT create_barrier(@count_barrier, @barrier_limit);
create_barrier(@count_barrier, @barrier_limit)
1
SELECT if ((SESSION_ID = CONNECTION_ID()), "YES", "NO"), GENERATION, if ((WAITER_LIMIT = @barrier_limit), "YES", "NO") from DATA_DICTIONARY.USER_DEFINED_BARRIERS WHERE USER_BARRIER_NAME=@count_barrier;
if ((SESSION_ID = CONNECTION_ID()), "YES", "NO") GENERATION if ((WAITER_LIMIT = @barrier_limit), "YES", "NO")
YES 0 YES
set @count_barrier= "count_barrier";
SELECT wait(@count_barrier),
"con1","llllllllllloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongTooooooooooooooooooooooooooooChhhhhhhhhhhhhhhhhhhhheeeeeeeeeeeeeeeecccccccccccccccccccccccckkkkkkkkkkkkkkkkkkkFooooooooooooooooooooooooooooooooooooooooooorIssssssssssssssssssssssssssssssssssssssssssssssssuuuuuuuuuuuuuuuuuuuuuuueeeeeeeeeeeeeeesssssssssssssssssssssssOoooooooofffffffffffffffffffffffffffffffffLeeeeeeeeeeeeeeeennnnnnnnnnnnnnnnnnnnnnnnnnnngggggggggggggggggggggggggggggtttttttttttttttthhhh";
set @count_barrier= "count_barrier";
SELECT WAIT_UNTIL(@count_barrier, 1);
WAIT_UNTIL(@count_barrier, 1)
1
SELECT USER,INFO FROM DATA_DICTIONARY.PROCESSLIST;
USER INFO
root NULL
root SELECT wait(@count_barrier),
"con1","llllllllllloooooooooooooooooooooooooooooooooooooooooooooooooooo
root SELECT USER,INFO FROM DATA_DICTIONARY.PROCESSLIST
SELECT signal(@count_barrier);
signal(@count_barrier)
1
|