1
create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
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);
10
`a` tinyint(3) unsigned NOT NULL,
12
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
13
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
23
select * from t1 where a=253;
26
delete from t1 where a=253;
36
create table t2 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
37
partition by key (a) partitions 8;
40
t2 CREATE TABLE `t2` (
41
`a` tinyint(3) unsigned NOT NULL,
43
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 8 */
44
insert into t2 values (255), (254), (253), (252);
51
select * from t2 where a=253;
54
delete from t2 where a=253;
62
select count(*) from t2;
66
create table t3 (a tinyint not null, primary key(a)) engine='MYISAM'
67
partition by key (a) partitions 10;
70
t3 CREATE TABLE `t3` (
71
`a` tinyint(4) NOT NULL,
73
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
74
insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0);
86
select * from t3 where a=125;
89
delete from t3 where a=125;
101
create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
102
partition by key (a) (
103
partition pa1 max_rows=20 min_rows=2,
104
partition pa2 max_rows=30 min_rows=3,
105
partition pa3 max_rows=30 min_rows=4,
106
partition pa4 max_rows=40 min_rows=2);
107
show create table t1;
109
t1 CREATE TABLE `t1` (
110
`a` smallint(5) unsigned NOT NULL,
112
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
113
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
123
select * from t1 where a=65533;
126
delete from t1 where a=65533;
136
create table t2 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
137
partition by key (a) partitions 8;
138
show create table t2;
140
t2 CREATE TABLE `t2` (
141
`a` smallint(5) unsigned NOT NULL,
143
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 8 */
144
insert into t2 values (65535), (65534), (65533), (65532);
151
select * from t2 where a=65533;
154
delete from t2 where a=65533;
162
select count(*) from t2;
166
create table t3 (a smallint not null, primary key(a)) engine='MYISAM'
167
partition by key (a) partitions 10;
168
show create table t3;
170
t3 CREATE TABLE `t3` (
171
`a` smallint(6) NOT NULL,
173
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
174
insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0);
186
select * from t3 where a=32765;
189
delete from t3 where a=32765;
201
create table t1 (a int unsigned not null, primary key(a)) engine='MYISAM'
202
partition by key (a) (
203
partition pa1 max_rows=20 min_rows=2,
204
partition pa2 max_rows=30 min_rows=3,
205
partition pa3 max_rows=30 min_rows=4,
206
partition pa4 max_rows=40 min_rows=2);
207
show create table t1;
209
t1 CREATE TABLE `t1` (
210
`a` int(10) unsigned NOT NULL,
212
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
213
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
223
select * from t1 where a=4294967293;
226
delete from t1 where a=4294967293;
236
create table t2 (a int unsigned not null, primary key(a)) engine='MYISAM'
237
partition by key (a) partitions 10;
238
show create table t2;
240
t2 CREATE TABLE `t2` (
241
`a` int(10) unsigned NOT NULL,
243
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
244
insert into t2 values (4294967295), (4294967294), (4294967293), (4294967292);
251
select * from t2 where a=4294967293;
254
delete from t2 where a=4294967293;
262
select count(*) from t2;
266
create table t3 (a int not null, primary key(a)) engine='MYISAM'
267
partition by key (a) partitions 10;
268
show create table t3;
270
t3 CREATE TABLE `t3` (
271
`a` int(11) NOT NULL,
273
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
274
insert into t3 values (2147483647), (2147483646), (2147483645), (2147483644), (-2147483648), (-2147483647), (1), (-1), (0);
286
select * from t3 where a=2147483645;
289
delete from t3 where a=2147483645;
301
create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
302
partition by key (a) (
303
partition pa1 max_rows=20 min_rows=2,
304
partition pa2 max_rows=30 min_rows=3,
305
partition pa3 max_rows=30 min_rows=4,
306
partition pa4 max_rows=40 min_rows=2);
307
show create table t1;
309
t1 CREATE TABLE `t1` (
310
`a` mediumint(8) unsigned NOT NULL,
312
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
313
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
323
select * from t1 where a=16777213;
326
delete from t1 where a=16777213;
336
create table t2 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
337
partition by key (a) partitions 8;
338
show create table t2;
340
t2 CREATE TABLE `t2` (
341
`a` mediumint(8) unsigned NOT NULL,
343
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 8 */
344
insert into t2 values (16777215), (16777214), (16777213), (16777212);
351
select * from t2 where a=16777213;
354
delete from t2 where a=16777213;
362
select count(*) from t2;
366
create table t3 (a mediumint not null, primary key(a)) engine='MYISAM'
367
partition by key (a) partitions 10;
368
show create table t3;
370
t3 CREATE TABLE `t3` (
371
`a` mediumint(9) NOT NULL,
373
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
374
insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0);
386
select * from t3 where a=8388605;
389
delete from t3 where a=8388605;
401
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
402
partition by key (a) (
403
partition pa1 max_rows=20 min_rows=2,
404
partition pa2 max_rows=30 min_rows=3,
405
partition pa3 max_rows=30 min_rows=4,
406
partition pa4 max_rows=40 min_rows=2);
407
show create table t1;
409
t1 CREATE TABLE `t1` (
410
`a` bigint(20) unsigned NOT NULL,
412
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
413
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
423
select * from t1 where a=-2;
425
delete from t1 where a=-2;
435
select * from t1 where a=18446744073709551615;
438
delete from t1 where a=18446744073709551615;
448
create table t2 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
449
partition by key (a) partitions 10;
450
show create table t2;
452
t2 CREATE TABLE `t2` (
453
`a` bigint(20) unsigned NOT NULL,
455
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
456
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
463
select * from t2 where a=18446744073709551615;
466
delete from t2 where a=18446744073709551615;
474
select count(*) from t2;
478
create table t3 (a bigint not null, primary key(a)) engine='MYISAM'
479
partition by key (a) partitions 10;
480
show create table t3;
482
t3 CREATE TABLE `t3` (
483
`a` bigint(20) NOT NULL,
485
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
486
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
498
select * from t3 where a=9223372036854775806;
501
delete from t3 where a=9223372036854775806;