~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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";
set @count_barrier= "count_barrier";
SELECT wait(@count_barrier), "con2";
set @count_barrier= "count_barrier";
SELECT wait(@count_barrier), "con3";
set @count_barrier= "count_barrier";
SELECT wait(@count_barrier), "con4";
set @count_barrier= "count_barrier";
SELECT WAIT_UNTIL(@count_barrier, 4);
WAIT_UNTIL(@count_barrier, 4)
1
SELECT USER,INFO FROM DATA_DICTIONARY.PROCESSLIST ORDER BY ID;
USER	INFO
root	NULL
root	SELECT wait(@count_barrier), "con1"
root	SELECT wait(@count_barrier), "con2"
root	SELECT wait(@count_barrier), "con3"
root	SELECT wait(@count_barrier), "con4"
root	SELECT USER,INFO FROM DATA_DICTIONARY.PROCESSLIST ORDER BY ID
SELECT if ((@id:=ID), "YES", "NO") FROM DATA_DICTIONARY.PROCESSLIST WHERE INFO LIKE "%con3%" AND ID != CONNECTION_ID();
if ((@id:=ID), "YES", "NO")
YES
kill QUERY (@id);
SELECT WAIT_UNTIL(@count_barrier, 3);
WAIT_UNTIL(@count_barrier, 3)
1
SELECT USER,INFO FROM DATA_DICTIONARY.PROCESSLIST WHERE INFO LIKE "%con%" AND INFO NOT LIKE "%con3%" ORDER BY ID;
USER	INFO
root	SELECT wait(@count_barrier), "con1"
root	SELECT wait(@count_barrier), "con2"
root	SELECT wait(@count_barrier), "con4"
SELECT USER_BARRIER_NAME FROM DATA_DICTIONARY.USER_DEFINED_BARRIERS;
USER_BARRIER_NAME
count_barrier
SELECT signal(@count_barrier);
signal(@count_barrier)
1