Skip to content

Commit 6364adb

Browse files
committed
MDEV-10621 parts.partition_float_myisam failed with timeout in buildbot
parts.partition_float_myisam, parts.partition_int_myisam, parts.partition_float_innodb are all known to fail with timeouts on slow builders. The tests are composed of several independent parts for corresponding subtypes (float == float + double, int == tinyint + smallint + mediumint + int + bigint). The solution is to split them into separate tests. No test logic has been changed.
1 parent f49375f commit 6364adb

28 files changed

+1532
-1082
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
2+
partition by key (a) (
3+
partition pa1 max_rows=20 min_rows=2,
4+
partition pa2 max_rows=30 min_rows=3,
5+
partition pa3 max_rows=30 min_rows=4,
6+
partition pa4 max_rows=40 min_rows=2);
7+
show create table t1;
8+
Table Create Table
9+
t1 CREATE TABLE `t1` (
10+
`a` bigint(20) unsigned NOT NULL,
11+
PRIMARY KEY (`a`)
12+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
13+
/*!50100 PARTITION BY KEY (a)
14+
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
15+
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
16+
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
17+
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
18+
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
19+
select * from t1;
20+
a
21+
1
22+
18446744073709551612
23+
18446744073709551613
24+
18446744073709551614
25+
18446744073709551615
26+
2
27+
65535
28+
select * from t1 where a=-2;
29+
a
30+
delete from t1 where a=-2;
31+
select * from t1;
32+
a
33+
1
34+
18446744073709551612
35+
18446744073709551613
36+
18446744073709551614
37+
18446744073709551615
38+
2
39+
65535
40+
select * from t1 where a=18446744073709551615;
41+
a
42+
18446744073709551615
43+
delete from t1 where a=18446744073709551615;
44+
select * from t1;
45+
a
46+
1
47+
18446744073709551612
48+
18446744073709551613
49+
18446744073709551614
50+
2
51+
65535
52+
drop table t1;
53+
create table t2 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
54+
partition by key (a) partitions 8;
55+
show create table t2;
56+
Table Create Table
57+
t2 CREATE TABLE `t2` (
58+
`a` bigint(20) unsigned NOT NULL,
59+
PRIMARY KEY (`a`)
60+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
61+
/*!50100 PARTITION BY KEY (a)
62+
PARTITIONS 8 */
63+
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
64+
select * from t2;
65+
a
66+
18446744073709551612
67+
18446744073709551613
68+
18446744073709551614
69+
18446744073709551615
70+
select * from t2 where a=18446744073709551615;
71+
a
72+
18446744073709551615
73+
delete from t2 where a=18446744073709551615;
74+
select * from t2;
75+
a
76+
18446744073709551612
77+
18446744073709551613
78+
18446744073709551614
79+
delete from t2;
80+
1024 inserts;
81+
select count(*) from t2;
82+
count(*)
83+
1024
84+
drop table t2;
85+
create table t3 (a bigint not null, primary key(a)) engine='InnoDB'
86+
partition by key (a) partitions 7;
87+
show create table t3;
88+
Table Create Table
89+
t3 CREATE TABLE `t3` (
90+
`a` bigint(20) NOT NULL,
91+
PRIMARY KEY (`a`)
92+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
93+
/*!50100 PARTITION BY KEY (a)
94+
PARTITIONS 7 */
95+
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
96+
select * from t3;
97+
a
98+
-1
99+
-9223372036854775807
100+
-9223372036854775808
101+
0
102+
1
103+
9223372036854775804
104+
9223372036854775805
105+
9223372036854775806
106+
9223372036854775807
107+
select * from t3 where a=9223372036854775806;
108+
a
109+
9223372036854775806
110+
delete from t3 where a=9223372036854775806;
111+
select * from t3;
112+
a
113+
-1
114+
-9223372036854775807
115+
-9223372036854775808
116+
0
117+
1
118+
9223372036854775804
119+
9223372036854775805
120+
9223372036854775807
121+
drop table t3;
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
2+
partition by key (a) (
3+
partition pa1 max_rows=20 min_rows=2,
4+
partition pa2 max_rows=30 min_rows=3,
5+
partition pa3 max_rows=30 min_rows=4,
6+
partition pa4 max_rows=40 min_rows=2);
7+
show create table t1;
8+
Table Create Table
9+
t1 CREATE TABLE `t1` (
10+
`a` bigint(20) unsigned NOT NULL,
11+
PRIMARY KEY (`a`)
12+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
13+
/*!50100 PARTITION BY KEY (a)
14+
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
15+
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
16+
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
17+
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
18+
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
19+
select * from t1;
20+
a
21+
1
22+
18446744073709551612
23+
18446744073709551613
24+
18446744073709551614
25+
18446744073709551615
26+
2
27+
65535
28+
select * from t1 where a=-2;
29+
a
30+
delete from t1 where a=-2;
31+
select * from t1;
32+
a
33+
1
34+
18446744073709551612
35+
18446744073709551613
36+
18446744073709551614
37+
18446744073709551615
38+
2
39+
65535
40+
select * from t1 where a=18446744073709551615;
41+
a
42+
18446744073709551615
43+
delete from t1 where a=18446744073709551615;
44+
select * from t1;
45+
a
46+
1
47+
18446744073709551612
48+
18446744073709551613
49+
18446744073709551614
50+
2
51+
65535
52+
drop table t1;
53+
create table t2 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
54+
partition by key (a) partitions 8;
55+
show create table t2;
56+
Table Create Table
57+
t2 CREATE TABLE `t2` (
58+
`a` bigint(20) unsigned NOT NULL,
59+
PRIMARY KEY (`a`)
60+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
61+
/*!50100 PARTITION BY KEY (a)
62+
PARTITIONS 8 */
63+
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
64+
select * from t2;
65+
a
66+
18446744073709551612
67+
18446744073709551613
68+
18446744073709551614
69+
18446744073709551615
70+
select * from t2 where a=18446744073709551615;
71+
a
72+
18446744073709551615
73+
delete from t2 where a=18446744073709551615;
74+
select * from t2;
75+
a
76+
18446744073709551612
77+
18446744073709551613
78+
18446744073709551614
79+
delete from t2;
80+
65535 inserts;
81+
select count(*) from t2;
82+
count(*)
83+
65535
84+
drop table t2;
85+
create table t3 (a bigint not null, primary key(a)) engine='MYISAM'
86+
partition by key (a) partitions 7;
87+
show create table t3;
88+
Table Create Table
89+
t3 CREATE TABLE `t3` (
90+
`a` bigint(20) NOT NULL,
91+
PRIMARY KEY (`a`)
92+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
93+
/*!50100 PARTITION BY KEY (a)
94+
PARTITIONS 7 */
95+
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
96+
select * from t3;
97+
a
98+
-1
99+
-9223372036854775807
100+
-9223372036854775808
101+
0
102+
1
103+
9223372036854775804
104+
9223372036854775805
105+
9223372036854775806
106+
9223372036854775807
107+
select * from t3 where a=9223372036854775806;
108+
a
109+
9223372036854775806
110+
delete from t3 where a=9223372036854775806;
111+
select * from t3;
112+
a
113+
-1
114+
-9223372036854775807
115+
-9223372036854775808
116+
0
117+
1
118+
9223372036854775804
119+
9223372036854775805
120+
9223372036854775807
121+
drop table t3;
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
create table t1 (a double not null, primary key(a)) engine='InnoDB'
2+
partition by key (a) (
3+
partition pa1 max_rows=20 min_rows=2,
4+
partition pa2 max_rows=30 min_rows=3,
5+
partition pa3 max_rows=30 min_rows=4,
6+
partition pa4 max_rows=40 min_rows=2);
7+
show create table t1;
8+
Table Create Table
9+
t1 CREATE TABLE `t1` (
10+
`a` double NOT NULL,
11+
PRIMARY KEY (`a`)
12+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
13+
/*!50100 PARTITION BY KEY (a)
14+
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
15+
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
16+
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
17+
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
18+
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
19+
select * from t1;
20+
a
21+
-2.2250738585072016e208
22+
-1.5
23+
-1
24+
-2.2250738585072014e-208
25+
0
26+
1.5
27+
1234.567
28+
2.2250738585072016e208
29+
select * from t1 where a=1.5;
30+
a
31+
1.5
32+
delete from t1 where a=1.5;
33+
select * from t1;
34+
a
35+
-2.2250738585072016e208
36+
-1.5
37+
-1
38+
-2.2250738585072014e-208
39+
0
40+
1234.567
41+
2.2250738585072016e208
42+
drop table t1;
43+
create table t2 (a double not null, primary key(a)) engine='InnoDB'
44+
partition by key (a) partitions 10;
45+
show create table t2;
46+
Table Create Table
47+
t2 CREATE TABLE `t2` (
48+
`a` double NOT NULL,
49+
PRIMARY KEY (`a`)
50+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
51+
/*!50100 PARTITION BY KEY (a)
52+
PARTITIONS 10 */
53+
insert into t2 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
54+
select * from t2;
55+
a
56+
-2.2250738585072016e208
57+
-1.5
58+
-1
59+
-2.2250738585072014e-208
60+
0
61+
1.5
62+
1234.567
63+
2.2250738585072016e208
64+
select * from t2 where a=1234.567;
65+
a
66+
1234.567
67+
delete from t2 where a=1234.567;
68+
select * from t2;
69+
a
70+
-2.2250738585072016e208
71+
-1.5
72+
-1
73+
-2.2250738585072014e-208
74+
0
75+
1.5
76+
2.2250738585072016e208
77+
delete from t2;
78+
1024*3 inserts;
79+
select count(*) from t2;
80+
count(*)
81+
3072
82+
drop table t2;

0 commit comments

Comments
 (0)