1
SET SESSION STORAGE_ENGINE = InnoDB;
2
drop table if exists t1;
3
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
4
SET SESSION STORAGE_ENGINE = InnoDB;
5
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
6
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
7
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
8
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
9
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
10
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
11
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
12
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
13
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
14
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
15
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
16
select get_lock("hello",1);
20
update t1 set eta=1+get_lock("hello",1)*0 where tipo=11;
22
update t1 set eta=2 where tipo=22;
23
select release_lock("hello");
28
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
29
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
30
10 1 ccccccccccccccccccccccccccccccccccccccccccc
31
20 2 ddddddddddddddddddddddddddddddddddddddddddd
32
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
33
40 2 fffffffffffffffffffffffffffffffffffffffffff
34
50 1 ggggggggggggggggggggggggggggggggggggggggggg
35
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
36
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
37
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
38
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
41
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
42
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
43
10 1 ccccccccccccccccccccccccccccccccccccccccccc
44
20 2 ddddddddddddddddddddddddddddddddddddddddddd
45
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
46
40 2 fffffffffffffffffffffffffffffffffffffffffff
47
50 1 ggggggggggggggggggggggggggggggggggggggggggg
48
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
49
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
50
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
51
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
55
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
56
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
57
10 1 ccccccccccccccccccccccccccccccccccccccccccc
58
20 2 ddddddddddddddddddddddddddddddddddddddddddd
59
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
60
40 2 fffffffffffffffffffffffffffffffffffffffffff
61
50 1 ggggggggggggggggggggggggggggggggggggggggggg
62
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
63
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
64
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
65
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
69
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
70
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
71
10 1 ccccccccccccccccccccccccccccccccccccccccccc
72
20 2 ddddddddddddddddddddddddddddddddddddddddddd
73
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
74
40 2 fffffffffffffffffffffffffffffffffffffffffff
75
50 1 ggggggggggggggggggggggggggggggggggggggggggg
76
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
77
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
78
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
79
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
82
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
83
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
84
10 1 ccccccccccccccccccccccccccccccccccccccccccc
85
20 2 ddddddddddddddddddddddddddddddddddddddddddd
86
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
87
40 2 fffffffffffffffffffffffffffffffffffffffffff
88
50 1 ggggggggggggggggggggggggggggggggggggggggggg
89
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
90
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
91
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
92
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
95
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
96
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
97
10 1 ccccccccccccccccccccccccccccccccccccccccccc
98
20 2 ddddddddddddddddddddddddddddddddddddddddddd
99
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
100
40 2 fffffffffffffffffffffffffffffffffffffffffff
101
50 1 ggggggggggggggggggggggggggggggggggggggggggg
102
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
103
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
104
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
105
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
107
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
108
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
109
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
110
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
111
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
112
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
113
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
114
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
115
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
116
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
117
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
118
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
119
select get_lock("hello",10);
123
update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
125
update t1 set tipo=1 where tipo=2;
126
select release_lock("hello");
127
release_lock("hello")
131
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
132
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
133
10 1 ccccccccccccccccccccccccccccccccccccccccccc
134
20 1 ddddddddddddddddddddddddddddddddddddddddddd
135
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
136
40 1 fffffffffffffffffffffffffffffffffffffffffff
137
50 1 ggggggggggggggggggggggggggggggggggggggggggg
138
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
139
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
140
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
141
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
144
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
145
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
146
1 1 ccccccccccccccccccccccccccccccccccccccccccc
147
20 2 ddddddddddddddddddddddddddddddddddddddddddd
148
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
149
40 2 fffffffffffffffffffffffffffffffffffffffffff
150
1 1 ggggggggggggggggggggggggggggggggggggggggggg
151
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
152
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
153
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
154
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
158
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
159
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
160
10 1 ccccccccccccccccccccccccccccccccccccccccccc
161
20 1 ddddddddddddddddddddddddddddddddddddddddddd
162
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
163
40 1 fffffffffffffffffffffffffffffffffffffffffff
164
50 1 ggggggggggggggggggggggggggggggggggggggggggg
165
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
166
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
167
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
168
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
172
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
173
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
174
10 1 ccccccccccccccccccccccccccccccccccccccccccc
175
20 1 ddddddddddddddddddddddddddddddddddddddddddd
176
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
177
40 1 fffffffffffffffffffffffffffffffffffffffffff
178
50 1 ggggggggggggggggggggggggggggggggggggggggggg
179
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
180
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
181
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
182
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
185
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
186
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
187
1 1 ccccccccccccccccccccccccccccccccccccccccccc
188
20 1 ddddddddddddddddddddddddddddddddddddddddddd
189
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
190
40 1 fffffffffffffffffffffffffffffffffffffffffff
191
1 1 ggggggggggggggggggggggggggggggggggggggggggg
192
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
193
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
194
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
195
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
198
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
199
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
200
1 1 ccccccccccccccccccccccccccccccccccccccccccc
201
20 1 ddddddddddddddddddddddddddddddddddddddddddd
202
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
203
40 1 fffffffffffffffffffffffffffffffffffffffffff
204
1 1 ggggggggggggggggggggggggggggggggggggggggggg
205
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
206
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
207
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
208
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
210
create table t1 (a int not null, b int not null);
211
insert into t1 values (1,1),(2,1),(3,1),(4,1);
212
select get_lock("hello2",1000);
213
get_lock("hello2",1000)
216
update t1 set b=10+get_lock(concat("hello",a),1000)*0 where
218
insert into t1 values (1,1);
219
select release_lock("hello2");
220
release_lock("hello2")
238
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
239
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
240
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
241
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
242
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
243
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
244
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
245
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
246
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
247
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
248
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
249
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
250
select get_lock("hello",10);
254
select * from t1 where tipo=2 FOR UPDATE;
256
select release_lock("hello");
257
release_lock("hello")
259
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
260
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
263
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
264
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
265
10 1 ccccccccccccccccccccccccccccccccccccccccccc
266
20 2 ddddddddddddddddddddddddddddddddddddddddddd
267
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
268
40 2 fffffffffffffffffffffffffffffffffffffffffff
269
50 1 ggggggggggggggggggggggggggggggggggggggggggg
270
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
271
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
272
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
273
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
275
20 2 ddddddddddddddddddddddddddddddddddddddddddd
276
40 2 fffffffffffffffffffffffffffffffffffffffffff
277
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
280
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
281
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
282
10 1 ccccccccccccccccccccccccccccccccccccccccccc
283
20 2 ddddddddddddddddddddddddddddddddddddddddddd
284
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
285
40 2 fffffffffffffffffffffffffffffffffffffffffff
286
50 1 ggggggggggggggggggggggggggggggggggggggggggg
287
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
288
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
289
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
290
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
295
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
296
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
297
10 1 ccccccccccccccccccccccccccccccccccccccccccc
298
20 2 ddddddddddddddddddddddddddddddddddddddddddd
299
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
300
40 2 fffffffffffffffffffffffffffffffffffffffffff
301
50 1 ggggggggggggggggggggggggggggggggggggggggggg
302
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
303
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
304
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
305
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
308
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
309
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
310
10 1 ccccccccccccccccccccccccccccccccccccccccccc
311
20 2 ddddddddddddddddddddddddddddddddddddddddddd
312
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
313
40 2 fffffffffffffffffffffffffffffffffffffffffff
314
50 1 ggggggggggggggggggggggggggggggggggggggggggg
315
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
316
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
317
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
318
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
320
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
321
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
322
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
323
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
324
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
325
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
326
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
327
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
328
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
329
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
330
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
331
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
332
select get_lock("hello",10);
336
select * from t1 where tipo=2 FOR UPDATE;
338
select release_lock("hello");
339
release_lock("hello")
341
update t1 set tipo=11+get_lock("hello",10)*0 where tipo=22;
342
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
345
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
346
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
347
10 1 ccccccccccccccccccccccccccccccccccccccccccc
348
20 2 ddddddddddddddddddddddddddddddddddddddddddd
349
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
350
40 2 fffffffffffffffffffffffffffffffffffffffffff
351
50 1 ggggggggggggggggggggggggggggggggggggggggggg
352
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
353
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
354
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
355
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
357
20 2 ddddddddddddddddddddddddddddddddddddddddddd
358
40 2 fffffffffffffffffffffffffffffffffffffffffff
359
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
362
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
363
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
364
10 1 ccccccccccccccccccccccccccccccccccccccccccc
365
20 2 ddddddddddddddddddddddddddddddddddddddddddd
366
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
367
40 2 fffffffffffffffffffffffffffffffffffffffffff
368
50 1 ggggggggggggggggggggggggggggggggggggggggggg
369
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
370
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
371
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
372
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
377
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
378
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
379
10 1 ccccccccccccccccccccccccccccccccccccccccccc
380
20 2 ddddddddddddddddddddddddddddddddddddddddddd
381
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
382
40 2 fffffffffffffffffffffffffffffffffffffffffff
383
50 1 ggggggggggggggggggggggggggggggggggggggggggg
384
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
385
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
386
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
387
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
390
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
391
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
392
10 1 ccccccccccccccccccccccccccccccccccccccccccc
393
20 2 ddddddddddddddddddddddddddddddddddddddddddd
394
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
395
40 2 fffffffffffffffffffffffffffffffffffffffffff
396
50 1 ggggggggggggggggggggggggggggggggggggggggggg
397
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
398
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
399
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
400
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
402
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
403
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
404
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
405
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
406
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
407
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
408
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
409
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
410
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
411
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
412
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
413
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
414
select get_lock("hello",10);
418
select * from t1 where tipo=2 FOR UPDATE;
420
select release_lock("hello");
421
release_lock("hello")
423
select * from t1 where tipo=1 FOR UPDATE;
424
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
426
20 2 ddddddddddddddddddddddddddddddddddddddddddd
427
40 2 fffffffffffffffffffffffffffffffffffffffffff
428
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
431
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
432
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
433
10 1 ccccccccccccccccccccccccccccccccccccccccccc
434
20 2 ddddddddddddddddddddddddddddddddddddddddddd
435
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
436
40 2 fffffffffffffffffffffffffffffffffffffffffff
437
50 1 ggggggggggggggggggggggggggggggggggggggggggg
438
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
439
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
440
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
441
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
446
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
447
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
448
10 1 ccccccccccccccccccccccccccccccccccccccccccc
449
20 2 ddddddddddddddddddddddddddddddddddddddddddd
450
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
451
40 2 fffffffffffffffffffffffffffffffffffffffffff
452
50 1 ggggggggggggggggggggggggggggggggggggggggggg
453
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
454
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
455
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
456
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
459
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
460
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
461
10 1 ccccccccccccccccccccccccccccccccccccccccccc
462
20 2 ddddddddddddddddddddddddddddddddddddddddddd
463
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
464
40 2 fffffffffffffffffffffffffffffffffffffffffff
465
50 1 ggggggggggggggggggggggggggggggggggggggggggg
466
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
467
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
468
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
469
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
471
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
472
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
473
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
474
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
475
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
476
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
477
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
478
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
479
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
480
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
481
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
482
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
483
select get_lock("hello",10);
487
delete from t1 where tipo=2;
489
select release_lock("hello");
490
release_lock("hello")
492
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
493
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
496
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
497
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
498
10 1 ccccccccccccccccccccccccccccccccccccccccccc
499
20 2 ddddddddddddddddddddddddddddddddddddddddddd
500
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
501
40 2 fffffffffffffffffffffffffffffffffffffffffff
502
50 1 ggggggggggggggggggggggggggggggggggggggggggg
503
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
504
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
505
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
506
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
509
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
510
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
511
10 1 ccccccccccccccccccccccccccccccccccccccccccc
512
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
513
50 1 ggggggggggggggggggggggggggggggggggggggggggg
514
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
515
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
516
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
521
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
522
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
523
10 1 ccccccccccccccccccccccccccccccccccccccccccc
524
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
525
50 1 ggggggggggggggggggggggggggggggggggggggggggg
526
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
527
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
528
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
531
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
532
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
533
10 1 ccccccccccccccccccccccccccccccccccccccccccc
534
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
535
50 1 ggggggggggggggggggggggggggggggggggggggggggg
536
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
537
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
538
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
540
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
541
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
542
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
543
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
544
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
545
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
546
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
547
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
548
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
549
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
550
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
551
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
552
select get_lock("hello",10);
556
delete from t1 where tipo=2;
558
select release_lock("hello");
559
release_lock("hello")
561
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=22;
564
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
565
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
566
10 1 ccccccccccccccccccccccccccccccccccccccccccc
567
20 2 ddddddddddddddddddddddddddddddddddddddddddd
568
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
569
40 2 fffffffffffffffffffffffffffffffffffffffffff
570
50 1 ggggggggggggggggggggggggggggggggggggggggggg
571
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
572
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
573
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
574
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
577
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
578
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
579
10 1 ccccccccccccccccccccccccccccccccccccccccccc
580
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
581
50 1 ggggggggggggggggggggggggggggggggggggggggggg
582
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
583
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
584
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
589
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
590
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
591
10 1 ccccccccccccccccccccccccccccccccccccccccccc
592
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
593
50 1 ggggggggggggggggggggggggggggggggggggggggggg
594
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
595
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
596
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
599
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
600
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
601
10 1 ccccccccccccccccccccccccccccccccccccccccccc
602
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
603
50 1 ggggggggggggggggggggggggggggggggggggggggggg
604
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
605
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
606
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk