Skip to content

Commit 38347ae

Browse files
committed
Merge branch 'mysql-8.0' into mysql-8.4
Change-Id: I982bb46e3fe280511808850592ead6d9714c18ec
2 parents 2d665a8 + 5635d3b commit 38347ae

15 files changed

+735
-82
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# We are using some debug-only features in this test
2+
call mtr.add_suppression("Receive from NDB failed");
3+
Create some tables suitable for executing operations on
4+
-------------------------------------------------------
5+
use test;
6+
create table test.t1 (a int primary key, b int, key(b), c int, unique(c)) engine=ndb;
7+
Insert 40 rows
8+
insert into test.t1 values (0, 0, 0);;
9+
insert into test.t1 values (1, 1, 1);;
10+
insert into test.t1 values (2, 2, 2);;
11+
insert into test.t1 values (3, 3, 3);;
12+
insert into test.t1 values (4, 4, 4);;
13+
insert into test.t1 values (5, 5, 5);;
14+
insert into test.t1 values (6, 6, 6);;
15+
insert into test.t1 values (7, 7, 7);;
16+
insert into test.t1 values (8, 8, 8);;
17+
insert into test.t1 values (9, 9, 9);;
18+
insert into test.t1 values (10, 10, 10);;
19+
insert into test.t1 values (11, 11, 11);;
20+
insert into test.t1 values (12, 12, 12);;
21+
insert into test.t1 values (13, 13, 13);;
22+
insert into test.t1 values (14, 14, 14);;
23+
insert into test.t1 values (15, 15, 15);;
24+
insert into test.t1 values (16, 16, 16);;
25+
insert into test.t1 values (17, 17, 17);;
26+
insert into test.t1 values (18, 18, 18);;
27+
insert into test.t1 values (19, 19, 19);;
28+
insert into test.t1 values (20, 20, 20);;
29+
insert into test.t1 values (21, 21, 21);;
30+
insert into test.t1 values (22, 22, 22);;
31+
insert into test.t1 values (23, 23, 23);;
32+
insert into test.t1 values (24, 24, 24);;
33+
insert into test.t1 values (25, 25, 25);;
34+
insert into test.t1 values (26, 26, 26);;
35+
insert into test.t1 values (27, 27, 27);;
36+
insert into test.t1 values (28, 28, 28);;
37+
insert into test.t1 values (29, 29, 29);;
38+
insert into test.t1 values (30, 30, 30);;
39+
insert into test.t1 values (31, 31, 31);;
40+
insert into test.t1 values (32, 32, 32);;
41+
insert into test.t1 values (33, 33, 33);;
42+
insert into test.t1 values (34, 34, 34);;
43+
insert into test.t1 values (35, 35, 35);;
44+
insert into test.t1 values (36, 36, 36);;
45+
insert into test.t1 values (37, 37, 37);;
46+
insert into test.t1 values (38, 38, 38);;
47+
insert into test.t1 values (39, 39, 39);;
48+
Take row locks in other session
49+
begin;
50+
select * from test.t1 where a < 10 order by a for update;
51+
a b c
52+
0 0 0
53+
1 1 1
54+
2 2 2
55+
3 3 3
56+
4 4 4
57+
5 5 5
58+
6 6 6
59+
7 7 7
60+
8 8 8
61+
9 9 9
62+
set @save_debug = @@session.debug;
63+
SET SESSION debug="+d,ndb_reduced_api_protocol_timeout";
64+
----------------------------
65+
Autocommit PK SELECT timeout
66+
----------------------------
67+
select * from test.t1 where a=0 for update;
68+
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
69+
Check pk lookups
70+
Check transaction leaks
71+
Leaks
72+
0
73+
select count(1) as ops from ndbinfo.cluster_operations;
74+
ops
75+
10
76+
--------------------------------------
77+
Stateful transaction PK SELECT timeout
78+
--------------------------------------
79+
begin;
80+
insert into test.t1 values (100,100,100);
81+
select * from test.t1 where a=2 for update;
82+
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
83+
Check pk lookups
84+
Check transaction leaks
85+
Leaks
86+
0
87+
select count(1) as ops from ndbinfo.cluster_operations;
88+
ops
89+
10
90+
----------------------------
91+
Autocommit UK SELECT timeout
92+
----------------------------
93+
select * from test.t1 where c=0 for update;
94+
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
95+
Check pk lookups
96+
Check transaction leaks
97+
Leaks
98+
0
99+
select count(1) as ops from ndbinfo.cluster_operations;
100+
ops
101+
10
102+
--------------------------------------
103+
Stateful transaction UK SELECT timeout
104+
--------------------------------------
105+
begin;
106+
insert into test.t1 values (100,100,100);
107+
select * from test.t1 where c=2 for update;
108+
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
109+
Check pk lookups
110+
Check transaction leaks
111+
Leaks
112+
0
113+
select count(1) as ops from ndbinfo.cluster_operations;
114+
ops
115+
10
116+
rollback;
117+
SET SESSION debug=@save_debug;
118+
drop table test.t1;

mysql-test/suite/ndb/r/ndb_scan_protocol_timeout.result

Lines changed: 92 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ Unordered scan timeout due to load
186186
Standalone
187187
----------------------------------
188188
Time out waiting for response, but close() cleans up
189+
189190
select * from test.t1 where a > 70 order by b;
190191
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
191192
Check pk lookups
193+
192194
Check transaction leaks
193195
Leaks
194196
0
@@ -201,11 +203,13 @@ Unordered scan timeout due to load
201203
As part of a stateful transaction
202204
----------------------------------
203205
Time out waiting for response, but close() cleans up
206+
204207
begin;
205208
insert into test.t1 values (54,54);
206209
select * from test.t1 where a > 70 order by b;
207210
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
208211
Check pk lookups
212+
209213
Check transaction leaks
210214
Leaks
211215
0
@@ -217,12 +221,14 @@ ops
217221
Unordered scan timeout due to bug
218222
----------------------------------
219223
Standalone
224+
220225
select * from test.t1 order by b;
221226
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
222227
Check pk lookups
228+
223229
Check transaction leaks
224230
Leaks
225-
1
231+
0
226232
select count(1) as ops from ndbinfo.cluster_operations;
227233
ops
228234
0
@@ -231,14 +237,16 @@ ops
231237
Unordered scan timeout due to bug
232238
----------------------------------
233239
As part of a stateful transaction
240+
234241
begin;
235242
insert into test.t1 values (54,54);
236243
select * from test.t1 order by b;
237244
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
238245
Check pk lookups
246+
239247
Check transaction leaks
240248
Leaks
241-
1
249+
0
242250
select count(1) as ops from ndbinfo.cluster_operations;
243251
ops
244252
0
@@ -248,9 +256,11 @@ Ordered scan timeout due to load
248256
Standalone
249257
----------------------------------
250258
Time out waiting for response, but close() cleans up
259+
251260
select * from test.t1 where a > 70 order by a;
252261
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
253262
Check pk lookups
263+
254264
Check transaction leaks
255265
Leaks
256266
0
@@ -263,11 +273,13 @@ Ordered scan timeout due to load
263273
As part of a stateful transaction
264274
----------------------------------
265275
Time out waiting for response, but close() cleans up
276+
266277
begin;
267278
insert into test.t1 values (54,54);
268279
select * from test.t1 where a > 70 order by a;
269280
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
270281
Check pk lookups
282+
271283
Check transaction leaks
272284
Leaks
273285
0
@@ -279,12 +291,14 @@ ops
279291
Ordered scan timeout due to bug
280292
Standalone
281293
----------------------------------
294+
282295
select * from test.t1 order by a;
283296
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
284297
Check pk lookups
298+
285299
Check transaction leaks
286300
Leaks
287-
1
301+
0
288302
select count(1) as ops from ndbinfo.cluster_operations;
289303
ops
290304
0
@@ -293,14 +307,88 @@ ops
293307
Ordered scan timeout due to bug
294308
As part of a stateful transaction
295309
----------------------------------
310+
296311
begin;
297312
insert into test.t1 values (54,54);
298313
select * from test.t1 order by a;
299314
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
315+
Check pk lookups
316+
317+
Check transaction leaks
318+
Leaks
319+
0
320+
select count(1) as ops from ndbinfo.cluster_operations;
321+
ops
322+
0
323+
324+
-------------------------------
325+
SPJ request timeout due to load
326+
-------------------------------
327+
Standalone
328+
329+
select t1.b, t2.b from test.t1 join test.t2 on t2.a = t1.b where t1.a > 70;
330+
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
331+
Check pk lookups
332+
Clear error condition
333+
334+
Check transaction leaks
335+
Leaks
336+
0
337+
select count(1) as ops from ndbinfo.cluster_operations;
338+
ops
339+
0
340+
341+
-------------------------------
342+
SPJ request timeout due to load
343+
-------------------------------
344+
As part of a stateful transaction
345+
346+
begin;
347+
insert into test.t1 values (54,54);
348+
select t1.b, t2.b from test.t1 join test.t2 on t2.a = t1.b where t1.a > 70;
349+
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
350+
Clear error condition
351+
300352
Check pk lookups
301353
Check transaction leaks
302354
Leaks
303-
1
355+
0
356+
select count(1) as ops from ndbinfo.cluster_operations;
357+
ops
358+
0
359+
360+
------------------------------
361+
SPJ request timeout due to bug
362+
------------------------------
363+
Standalone
364+
365+
select t1.b, t2.b from test.t1 join test.t2 on t2.a = t1.b;
366+
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
367+
Check pk lookups
368+
Clear error condition
369+
370+
Check transaction leaks
371+
Leaks
372+
0
373+
select count(1) as ops from ndbinfo.cluster_operations;
374+
ops
375+
0
376+
377+
-------------------------------
378+
SPJ request timeout due to bug
379+
------------------------------
380+
As part of a stateful transaction
381+
382+
begin;
383+
insert into test.t1 values (54,54);
384+
select t1.b, t2.b from test.t1 join test.t2 on t2.a = t1.b;
385+
ERROR HY000: Got error 4008 'Receive from NDB failed' from NDBCLUSTER
386+
Check pk lookups
387+
Clear error condition
388+
389+
Check transaction leaks
390+
Leaks
391+
0
304392
select count(1) as ops from ndbinfo.cluster_operations;
305393
ops
306394
0
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
!include suite/ndb/my.cnf
2+
3+
[cluster_config.1]
4+
# Increase TDDT to avoid it interfering with
5+
# API side timeout + cleanup handling
6+
TransactionDeadlockDetectionTimeout = 60000
7+
8+

0 commit comments

Comments
 (0)