1SET DEBUG_SYNC= 'RESET';
2DROP TABLE IF EXISTS t1;
3SHOW VARIABLES LIKE 'DEBUG_SYNC';
4Variable_name	Value
5debug_sync	ON - signals: ''
6SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
7SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2';
8SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6           HIT_LIMIT 3';
9SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6';
10SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2           EXECUTE 2 HIT_LIMIT 3';
11SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2           EXECUTE 2';
12SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2                     HIT_LIMIT 3';
13SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2';
14SET DEBUG_SYNC='p0 SIGNAL s1                       EXECUTE 2 HIT_LIMIT 3';
15SET DEBUG_SYNC='p0 SIGNAL s1                       EXECUTE 2';
16SET DEBUG_SYNC='p0 SIGNAL s1                                 HIT_LIMIT 3';
17SET DEBUG_SYNC='p0 SIGNAL s1';
18SET DEBUG_SYNC='p0           WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
19SET DEBUG_SYNC='p0           WAIT_FOR s2 TIMEOUT 6 EXECUTE 2';
20SET DEBUG_SYNC='p0           WAIT_FOR s2 TIMEOUT 6           HIT_LIMIT 3';
21SET DEBUG_SYNC='p0           WAIT_FOR s2 TIMEOUT 6';
22SET DEBUG_SYNC='p0           WAIT_FOR s2           EXECUTE 2 HIT_LIMIT 3';
23SET DEBUG_SYNC='p0           WAIT_FOR s2           EXECUTE 2';
24SET DEBUG_SYNC='p0           WAIT_FOR s2                     HIT_LIMIT 3';
25SET DEBUG_SYNC='p0           WAIT_FOR s2';
26SET DEBUG_SYNC='p0                                           HIT_LIMIT 3';
27SET DEBUG_SYNC='p0 CLEAR';
28SET DEBUG_SYNC='p0 TEST';
29SET DEBUG_SYNC='RESET';
30set debug_sync='p0 signal s1 wait_for s2 timeout 6 execute 2 hit_limit 3';
31set debug_sync='p0 signal s1 wait_for s2 timeout 6 execute 2';
32set debug_sync='p0 signal s1 wait_for s2 timeout 6           hit_limit 3';
33set debug_sync='p0 signal s1 wait_for s2 timeout 6';
34set debug_sync='p0 signal s1 wait_for s2           execute 2 hit_limit 3';
35set debug_sync='p0 signal s1 wait_for s2           execute 2';
36set debug_sync='p0 signal s1 wait_for s2                     hit_limit 3';
37set debug_sync='p0 signal s1 wait_for s2';
38set debug_sync='p0 signal s1                       execute 2 hit_limit 3';
39set debug_sync='p0 signal s1                       execute 2';
40set debug_sync='p0 signal s1                                 hit_limit 3';
41set debug_sync='p0 signal s1';
42set debug_sync='p0           wait_for s2 timeout 6 execute 2 hit_limit 3';
43set debug_sync='p0           wait_for s2 timeout 6 execute 2';
44set debug_sync='p0           wait_for s2 timeout 6           hit_limit 3';
45set debug_sync='p0           wait_for s2 timeout 6';
46set debug_sync='p0           wait_for s2           execute 2 hit_limit 3';
47set debug_sync='p0           wait_for s2           execute 2';
48set debug_sync='p0           wait_for s2                     hit_limit 3';
49set debug_sync='p0           wait_for s2';
50set debug_sync='p0                                           hit_limit 3';
51set debug_sync='p0 clear';
52set debug_sync='p0 test';
53set debug_sync='reset';
54SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6
55                EXECUTE 2 HIT_LIMIT 3';
56SET DEBUG_SYNC='   p0 SIGNAL s1 WAIT_FOR s2';
57SET DEBUG_SYNC='p0    SIGNAL    s1    WAIT_FOR    s2';
58SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2   ';
59SET DEBUG_SYNC='   p0 SIGNAL s1 WAIT_FOR s2   ';
60SET DEBUG_SYNC='   p0    SIGNAL    s1    WAIT_FOR    s2   ';
61SET DEBUG_SYNC='';
62ERROR 42000: Missing synchronization point name
63SET DEBUG_SYNC=' ';
64ERROR 42000: Missing synchronization point name
65SET DEBUG_SYNC='p0';
66ERROR 42000: Missing action after synchronization point name 'p0'
67SET DEBUG_SYNC='p0                                          EXECUTE 2';
68ERROR 42000: Missing action before EXECUTE
69SET DEBUG_SYNC='p0                                TIMEOUT 6 EXECUTE 2';
70ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
71SET DEBUG_SYNC='p0                                TIMEOUT 6';
72ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
73SET DEBUG_SYNC='p0 WAIT_FOR s2 SIGNAL s1';
74ERROR 42000: Illegal or out of order stuff: 'SIGNAL'
75SET DEBUG_SYNC='p0 WAIT_FOR s2 SIGNAL s1           EXECUTE 2';
76ERROR 42000: Illegal or out of order stuff: 'SIGNAL'
77SET DEBUG_SYNC='p0 WAIT_FOR s2 SIGNAL s1 TIMEOUT 6 EXECUTE 2';
78ERROR 42000: Illegal or out of order stuff: 'SIGNAL'
79SET DEBUG_SYNC='p0 WAIT_FOR s2 SIGNAL s1 TIMEOUT 6';
80ERROR 42000: Illegal or out of order stuff: 'SIGNAL'
81SET DEBUG_SYNC='p0 WAIT_FOR s2 TIMEOUT 6 SIGNAL s1 EXECUTE 2';
82ERROR 42000: Illegal or out of order stuff: 'SIGNAL'
83SET DEBUG_SYNC='p0 WAIT_FOR s2 TIMEOUT 6 SIGNAL s1';
84ERROR 42000: Illegal or out of order stuff: 'SIGNAL'
85SET DEBUG_SYNC='p0 TIMEOUT 6 WAIT_FOR s2 EXECUTE 2';
86ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
87SET DEBUG_SYNC='p0 TIMEOUT 6 WAIT_FOR s2';
88ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
89SET DEBUG_SYNC='p0                  SIGNAL s1 TIMEOUT 6 EXECUTE 2';
90ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
91SET DEBUG_SYNC='p0                  SIGNAL s1 TIMEOUT 6';
92ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
93SET DEBUG_SYNC='p0 EXECUTE 2 SIGNAL s1 TIMEOUT 6';
94ERROR 42000: Missing action before EXECUTE
95SET DEBUG_SYNC='p0 TIMEOUT 6 SIGNAL s1';
96ERROR 42000: Illegal or out of order stuff: 'TIMEOUT'
97SET DEBUG_SYNC='p0 EXECUTE 2 TIMEOUT 6 SIGNAL s1';
98ERROR 42000: Missing action before EXECUTE
99SET DEBUG_SYNC='p0 CLEAR HIT_LIMIT 3';
100ERROR 42000: Nothing must follow action CLEAR
101SET DEBUG_SYNC='CLEAR';
102ERROR 42000: Missing action after synchronization point name 'CLEAR'
103SET DEBUG_SYNC='p0 CLEAR p0';
104ERROR 42000: Nothing must follow action CLEAR
105SET DEBUG_SYNC='TEST';
106ERROR 42000: Missing action after synchronization point name 'TEST'
107SET DEBUG_SYNC='p0 TEST p0';
108ERROR 42000: Nothing must follow action TEST
109SET DEBUG_SYNC='p0 RESET';
110ERROR 42000: Illegal or out of order stuff: 'RESET'
111SET DEBUG_SYNC='RESET p0';
112ERROR 42000: Illegal or out of order stuff: 'p0'
113SET DEBUG_SYNC='p0 RESET p0';
114ERROR 42000: Illegal or out of order stuff: 'RESET'
115SET DEBUG_SYNC='p0 SIGNAL ';
116ERROR 42000: Missing signal name after action SIGNAL
117SET DEBUG_SYNC='p0 WAIT_FOR ';
118ERROR 42000: Missing signal name after action WAIT_FOR
119SET DEBUG_SYNC='p0 SIGNAL s1 EXECUTE ';
120ERROR 42000: Missing valid number after EXECUTE
121SET DEBUG_SYNCx='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
122ERROR HY000: Unknown system variable 'DEBUG_SYNCx'
123SET DEBUG_SYNC='p0 SIGNAx s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
124ERROR 42000: Illegal or out of order stuff: 'SIGNAx'
125SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOx s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIT 3';
126ERROR 42000: Illegal or out of order stuff: 'WAIT_FOx'
127SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUx 0 EXECUTE 2 HIT_LIMIT 3';
128ERROR 42000: Illegal or out of order stuff: 'TIMEOUx'
129SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTx 2 HIT_LIMIT 3';
130ERROR 42000: Illegal or out of order stuff: 'EXECUTx'
131SET DEBUG_SYNC='p0 SIGNAL s1 WAIT_FOR s2 TIMEOUT 6 EXECUTE 2 HIT_LIMIx 3';
132ERROR 42000: Illegal or out of order stuff: 'HIT_LIMIx'
133SET DEBUG_SYNC='p0 CLEARx';
134ERROR 42000: Illegal or out of order stuff: 'CLEARx'
135SET DEBUG_SYNC='p0 TESTx';
136ERROR 42000: Illegal or out of order stuff: 'TESTx'
137SET DEBUG_SYNC='RESETx';
138ERROR 42000: Missing action after synchronization point name 'RESETx'
139SET DEBUG_SYNC='p0 WAIT_FOR s2 TIMEOUT 0x6 EXECUTE 2 HIT_LIMIT 3';
140ERROR 42000: Missing valid number after TIMEOUT
141SET DEBUG_SYNC='p0 WAIT_FOR s2 TIMEOUT 6 EXECUTE 0x2 HIT_LIMIT 3';
142ERROR 42000: Missing valid number after EXECUTE
143SET DEBUG_SYNC='p0 WAIT_FOR s2 TIMEOUT 7 EXECUTE 2 HIT_LIMIT 0x3';
144ERROR 42000: Missing valid number after HIT_LIMIT
145SET DEBUG_SYNC= 7;
146ERROR 42000: Incorrect argument type to variable 'debug_sync'
147SET GLOBAL DEBUG_SYNC= 'p0 CLEAR';
148ERROR HY000: Variable 'debug_sync' is a SESSION variable and can't be used with SET GLOBAL
149SET @myvar= 'now SIGNAL from_myvar';
150SET DEBUG_SYNC= @myvar;
151SHOW VARIABLES LIKE 'DEBUG_SYNC';
152Variable_name	Value
153debug_sync	ON - signals: 'from_myvar'
154SET DEBUG_SYNC= LEFT('now SIGNAL from_function_cut_here', 24);
155SHOW VARIABLES LIKE 'DEBUG_SYNC';
156Variable_name	Value
157debug_sync	ON - signals: 'from_function,from_myvar'
158SET DEBUG_SYNC= 'now SIGNAL something';
159SHOW VARIABLES LIKE 'DEBUG_SYNC';
160Variable_name	Value
161debug_sync	ON - signals: 'from_function,from_myvar,something'
162SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
163Warnings:
164Warning	####	debug sync point wait timed out
165SET DEBUG_SYNC= 'now SIGNAL nothing';
166SHOW VARIABLES LIKE 'DEBUG_SYNC';
167Variable_name	Value
168debug_sync	ON - signals: 'from_function,from_myvar,nothing,something'
169SET DEBUG_SYNC= 'now WAIT_FOR nothing TIMEOUT 0';
170SET DEBUG_SYNC= 'now SIGNAL something EXECUTE 0';
171SHOW VARIABLES LIKE 'DEBUG_SYNC';
172Variable_name	Value
173debug_sync	ON - signals: 'from_function,from_myvar,something'
174SET DEBUG_SYNC= 'now WAIT_FOR anotherthing TIMEOUT 0 EXECUTE 0';
175SET DEBUG_SYNC= 'now HIT_LIMIT 1';
176ERROR HY000: debug sync point hit limit reached
177SET DEBUG_SYNC= 'RESET';
178SHOW VARIABLES LIKE 'DEBUG_SYNC';
179Variable_name	Value
180debug_sync	ON - signals: ''
181SET DEBUG_SYNC= 'p1abcd   SIGNAL s1 EXECUTE 2';
182SET DEBUG_SYNC= 'p2abc    SIGNAL s2 EXECUTE 2';
183SET DEBUG_SYNC= 'p9abcdef SIGNAL s9 EXECUTE 2';
184SET DEBUG_SYNC= 'p4a      SIGNAL s4 EXECUTE 2';
185SET DEBUG_SYNC= 'p5abcde  SIGNAL s5 EXECUTE 2';
186SET DEBUG_SYNC= 'p6ab     SIGNAL s6 EXECUTE 2';
187SET DEBUG_SYNC= 'p7       SIGNAL s7 EXECUTE 2';
188SET DEBUG_SYNC= 'p8abcdef SIGNAL s8 EXECUTE 2';
189SET DEBUG_SYNC= 'p3abcdef SIGNAL s3 EXECUTE 2';
190SET DEBUG_SYNC= 'p4a      TEST';
191SHOW VARIABLES LIKE 'DEBUG_SYNC';
192Variable_name	Value
193debug_sync	ON - signals: 's4'
194SET DEBUG_SYNC= 'p1abcd   TEST';
195SHOW VARIABLES LIKE 'DEBUG_SYNC';
196Variable_name	Value
197debug_sync	ON - signals: 's1,s4'
198SET DEBUG_SYNC= 'p7       TEST';
199SHOW VARIABLES LIKE 'DEBUG_SYNC';
200Variable_name	Value
201debug_sync	ON - signals: 's1,s4,s7'
202SET DEBUG_SYNC= 'p9abcdef TEST';
203SHOW VARIABLES LIKE 'DEBUG_SYNC';
204Variable_name	Value
205debug_sync	ON - signals: 's1,s4,s7,s9'
206SET DEBUG_SYNC= 'p3abcdef TEST';
207SHOW VARIABLES LIKE 'DEBUG_SYNC';
208Variable_name	Value
209debug_sync	ON - signals: 's1,s3,s4,s7,s9'
210SET DEBUG_SYNC= 'p1abcd   CLEAR';
211SET DEBUG_SYNC= 'p2abc    CLEAR';
212SET DEBUG_SYNC= 'p5abcde  CLEAR';
213SET DEBUG_SYNC= 'p6ab     CLEAR';
214SET DEBUG_SYNC= 'p8abcdef CLEAR';
215SET DEBUG_SYNC= 'p9abcdef CLEAR';
216SET DEBUG_SYNC= 'p3abcdef CLEAR';
217SET DEBUG_SYNC= 'p4a      CLEAR';
218SET DEBUG_SYNC= 'p7       CLEAR';
219SET DEBUG_SYNC= 'p1abcd   TEST';
220SHOW VARIABLES LIKE 'DEBUG_SYNC';
221Variable_name	Value
222debug_sync	ON - signals: 's1,s3,s4,s7,s9'
223SET DEBUG_SYNC= 'p7       TEST';
224SHOW VARIABLES LIKE 'DEBUG_SYNC';
225Variable_name	Value
226debug_sync	ON - signals: 's1,s3,s4,s7,s9'
227SET DEBUG_SYNC= 'p9abcdef TEST';
228SHOW VARIABLES LIKE 'DEBUG_SYNC';
229Variable_name	Value
230debug_sync	ON - signals: 's1,s3,s4,s7,s9'
231SET DEBUG_SYNC= 'RESET';
232SHOW VARIABLES LIKE 'DEBUG_SYNC';
233Variable_name	Value
234debug_sync	ON - signals: ''
235CREATE USER mysqltest_1@localhost;
236GRANT SUPER ON *.* TO mysqltest_1@localhost;
237connection con1, mysqltest_1
238SET DEBUG_SYNC= 'RESET';
239connection default
240DROP USER mysqltest_1@localhost;
241CREATE USER mysqltest_2@localhost;
242GRANT ALL ON *.* TO mysqltest_2@localhost;
243REVOKE SUPER ON *.* FROM mysqltest_2@localhost;
244connection con1, mysqltest_2
245SET DEBUG_SYNC= 'RESET';
246ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
247connection default
248DROP USER mysqltest_2@localhost;
249SET DEBUG_SYNC= 'RESET';
250DROP TABLE IF EXISTS t1;
251CREATE TABLE t1 (c1 INT);
252connection con1
253SET DEBUG_SYNC= 'before_lock_tables_takes_lock
254      SIGNAL opened WAIT_FOR flushed';
255INSERT INTO t1 VALUES(1);
256connection default
257SET DEBUG_SYNC= 'now WAIT_FOR opened';
258SET DEBUG_SYNC= 'after_flush_unlock SIGNAL flushed';
259FLUSH TABLE t1;
260connection con1
261connection default
262DROP TABLE t1;
263SET DEBUG_SYNC= 'RESET';
264DROP TABLE IF EXISTS t1;
265CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
266INSERT INTO t1 VALUES (1);
267SELECT GET_LOCK('mysqltest_lock', 100);
268GET_LOCK('mysqltest_lock', 100)
2691
270connection con1
271# Sending:
272UPDATE t1 SET c1=GET_LOCK('mysqltest_lock', 100);;
273connection con2
274SET DEBUG_SYNC= 'wait_for_lock SIGNAL locked EXECUTE 2';
275INSERT INTO t1 VALUES (1);
276connection default
277SET DEBUG_SYNC= 'now WAIT_FOR locked';
278SELECT RELEASE_LOCK('mysqltest_lock');
279RELEASE_LOCK('mysqltest_lock')
2801
281connection con1
282# Reaping UPDATE
283SELECT RELEASE_LOCK('mysqltest_lock');
284RELEASE_LOCK('mysqltest_lock')
2851
286connection con2
287retrieve INSERT result.
288connection default
289DROP TABLE t1;
290SET DEBUG_SYNC= 'RESET';
291