1create table t1 (a tinyint unsigned not null, primary key(a)) engine='TokuDB'
2partition by key (a) (
3partition pa1 max_rows=20 min_rows=2,
4partition pa2 max_rows=30 min_rows=3,
5partition pa3 max_rows=30 min_rows=4,
6partition pa4 max_rows=40 min_rows=2);
7show create table t1;
8Table	Create Table
9t1	CREATE TABLE `t1` (
10  `a` tinyint(3) unsigned NOT NULL,
11  PRIMARY KEY (`a`)
12) ENGINE=TokuDB DEFAULT CHARSET=latin1
13/*!50100 PARTITION BY KEY (a)
14(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = TokuDB,
15 PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = TokuDB,
16 PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = TokuDB,
17 PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = TokuDB) */
18insert into t1 values (255), (254), (253), (252), (1), (2), (128);
19select * from t1;
20a
211
22128
232
24252
25253
26254
27255
28select * from t1 where a=253;
29a
30253
31delete from t1 where a=253;
32select * from t1;
33a
341
35128
362
37252
38254
39255
40drop table t1;
41create table t2 (a tinyint unsigned not null, primary key(a)) engine='TokuDB'
42partition by key (a) partitions 8;
43show create table t2;
44Table	Create Table
45t2	CREATE TABLE `t2` (
46  `a` tinyint(3) unsigned NOT NULL,
47  PRIMARY KEY (`a`)
48) ENGINE=TokuDB DEFAULT CHARSET=latin1
49/*!50100 PARTITION BY KEY (a)
50PARTITIONS 8 */
51insert into t2 values (255), (254), (253), (252);
52select * from t2;
53a
54252
55253
56254
57255
58select * from t2 where a=253;
59a
60253
61delete from t2 where a=253;
62select * from t2;
63a
64252
65254
66255
67delete from t2;
68255 inserts;
69select count(*) from t2;
70count(*)
71255
72drop table t2;
73create table t3 (a tinyint not null, primary key(a)) engine='TokuDB'
74partition by key (a) partitions 7;
75show create table t3;
76Table	Create Table
77t3	CREATE TABLE `t3` (
78  `a` tinyint(4) NOT NULL,
79  PRIMARY KEY (`a`)
80) ENGINE=TokuDB DEFAULT CHARSET=latin1
81/*!50100 PARTITION BY KEY (a)
82PARTITIONS 7 */
83insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0);
84select * from t3;
85a
86-1
87-127
88-128
890
901
91124
92125
93126
94127
95select * from t3 where a=125;
96a
97125
98delete from t3 where a=125;
99select * from t3;
100a
101-1
102-127
103-128
1040
1051
106124
107126
108127
109drop table t3;
110create table t1 (a smallint unsigned not null, primary key(a)) engine='TokuDB'
111partition by key (a) (
112partition pa1 max_rows=20 min_rows=2,
113partition pa2 max_rows=30 min_rows=3,
114partition pa3 max_rows=30 min_rows=4,
115partition pa4 max_rows=40 min_rows=2);
116show create table t1;
117Table	Create Table
118t1	CREATE TABLE `t1` (
119  `a` smallint(5) unsigned NOT NULL,
120  PRIMARY KEY (`a`)
121) ENGINE=TokuDB DEFAULT CHARSET=latin1
122/*!50100 PARTITION BY KEY (a)
123(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = TokuDB,
124 PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = TokuDB,
125 PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = TokuDB,
126 PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = TokuDB) */
127insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
128select * from t1;
129a
1301
1312
132256
13365532
13465533
13565534
13665535
137select * from t1 where a=65533;
138a
13965533
140delete from t1 where a=65533;
141select * from t1;
142a
1431
1442
145256
14665532
14765534
14865535
149drop table t1;
150create table t2 (a smallint unsigned not null, primary key(a)) engine='TokuDB'
151partition by key (a) partitions 8;
152show create table t2;
153Table	Create Table
154t2	CREATE TABLE `t2` (
155  `a` smallint(5) unsigned NOT NULL,
156  PRIMARY KEY (`a`)
157) ENGINE=TokuDB DEFAULT CHARSET=latin1
158/*!50100 PARTITION BY KEY (a)
159PARTITIONS 8 */
160insert into t2 values (65535), (65534), (65533), (65532);
161select * from t2;
162a
16365532
16465533
16565534
16665535
167select * from t2 where a=65533;
168a
16965533
170delete from t2 where a=65533;
171select * from t2;
172a
17365532
17465534
17565535
176delete from t2;
1771024 inserts;
178select count(*) from t2;
179count(*)
1801024
181drop table t2;
182create table t3 (a smallint not null, primary key(a)) engine='TokuDB'
183partition by key (a) partitions 7;
184show create table t3;
185Table	Create Table
186t3	CREATE TABLE `t3` (
187  `a` smallint(6) NOT NULL,
188  PRIMARY KEY (`a`)
189) ENGINE=TokuDB DEFAULT CHARSET=latin1
190/*!50100 PARTITION BY KEY (a)
191PARTITIONS 7 */
192insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0);
193select * from t3;
194a
195-1
196-32767
197-32768
1980
1991
20032764
20132765
20232766
20332767
204select * from t3 where a=32765;
205a
20632765
207delete from t3 where a=32765;
208select * from t3;
209a
210-1
211-32767
212-32768
2130
2141
21532764
21632766
21732767
218drop table t3;
219create table t1 (a int unsigned not null, primary key(a)) engine='TokuDB'
220partition by key (a) (
221partition pa1 max_rows=20 min_rows=2,
222partition pa2 max_rows=30 min_rows=3,
223partition pa3 max_rows=30 min_rows=4,
224partition pa4 max_rows=40 min_rows=2);
225show create table t1;
226Table	Create Table
227t1	CREATE TABLE `t1` (
228  `a` int(10) unsigned NOT NULL,
229  PRIMARY KEY (`a`)
230) ENGINE=TokuDB DEFAULT CHARSET=latin1
231/*!50100 PARTITION BY KEY (a)
232(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = TokuDB,
233 PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = TokuDB,
234 PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = TokuDB,
235 PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = TokuDB) */
236insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
237select * from t1;
238a
2391
2402
2414294967292
2424294967293
2434294967294
2444294967295
24565535
246select * from t1 where a=4294967293;
247a
2484294967293
249delete from t1 where a=4294967293;
250select * from t1;
251a
2521
2532
2544294967292
2554294967294
2564294967295
25765535
258drop table t1;
259create table t2 (a int unsigned not null, primary key(a)) engine='TokuDB'
260partition by key (a) partitions 8;
261show create table t2;
262Table	Create Table
263t2	CREATE TABLE `t2` (
264  `a` int(10) unsigned NOT NULL,
265  PRIMARY KEY (`a`)
266) ENGINE=TokuDB DEFAULT CHARSET=latin1
267/*!50100 PARTITION BY KEY (a)
268PARTITIONS 8 */
269insert into t2 values (4294967295), (4294967294), (4294967293), (4294967292);
270select * from t2;
271a
2724294967292
2734294967293
2744294967294
2754294967295
276select * from t2 where a=4294967293;
277a
2784294967293
279delete from t2 where a=4294967293;
280select * from t2;
281a
2824294967292
2834294967294
2844294967295
285delete from t2;
2861024 inserts;
287select count(*) from t2;
288count(*)
2891024
290drop table t2;
291create table t3 (a int not null, primary key(a)) engine='TokuDB'
292partition by key (a) partitions 7;
293show create table t3;
294Table	Create Table
295t3	CREATE TABLE `t3` (
296  `a` int(11) NOT NULL,
297  PRIMARY KEY (`a`)
298) ENGINE=TokuDB DEFAULT CHARSET=latin1
299/*!50100 PARTITION BY KEY (a)
300PARTITIONS 7 */
301insert into t3 values (2147483647), (2147483646), (2147483645), (2147483644), (-2147483648), (-2147483647), (1), (-1), (0);
302select * from t3;
303a
304-1
305-2147483647
306-2147483648
3070
3081
3092147483644
3102147483645
3112147483646
3122147483647
313select * from t3 where a=2147483645;
314a
3152147483645
316delete from t3 where a=2147483645;
317select * from t3;
318a
319-1
320-2147483647
321-2147483648
3220
3231
3242147483644
3252147483646
3262147483647
327drop table t3;
328create table t1 (a mediumint unsigned not null, primary key(a)) engine='TokuDB'
329partition by key (a) (
330partition pa1 max_rows=20 min_rows=2,
331partition pa2 max_rows=30 min_rows=3,
332partition pa3 max_rows=30 min_rows=4,
333partition pa4 max_rows=40 min_rows=2);
334show create table t1;
335Table	Create Table
336t1	CREATE TABLE `t1` (
337  `a` mediumint(8) unsigned NOT NULL,
338  PRIMARY KEY (`a`)
339) ENGINE=TokuDB DEFAULT CHARSET=latin1
340/*!50100 PARTITION BY KEY (a)
341(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = TokuDB,
342 PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = TokuDB,
343 PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = TokuDB,
344 PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = TokuDB) */
345insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
346select * from t1;
347a
3481
34916777212
35016777213
35116777214
35216777215
3532
35465535
355select * from t1 where a=16777213;
356a
35716777213
358delete from t1 where a=16777213;
359select * from t1;
360a
3611
36216777212
36316777214
36416777215
3652
36665535
367drop table t1;
368create table t2 (a mediumint unsigned not null, primary key(a)) engine='TokuDB'
369partition by key (a) partitions 8;
370show create table t2;
371Table	Create Table
372t2	CREATE TABLE `t2` (
373  `a` mediumint(8) unsigned NOT NULL,
374  PRIMARY KEY (`a`)
375) ENGINE=TokuDB DEFAULT CHARSET=latin1
376/*!50100 PARTITION BY KEY (a)
377PARTITIONS 8 */
378insert into t2 values (16777215), (16777214), (16777213), (16777212);
379select * from t2;
380a
38116777212
38216777213
38316777214
38416777215
385select * from t2 where a=16777213;
386a
38716777213
388delete from t2 where a=16777213;
389select * from t2;
390a
39116777212
39216777214
39316777215
394delete from t2;
3951024 inserts;
396select count(*) from t2;
397count(*)
3981024
399drop table t2;
400create table t3 (a mediumint not null, primary key(a)) engine='TokuDB'
401partition by key (a) partitions 7;
402show create table t3;
403Table	Create Table
404t3	CREATE TABLE `t3` (
405  `a` mediumint(9) NOT NULL,
406  PRIMARY KEY (`a`)
407) ENGINE=TokuDB DEFAULT CHARSET=latin1
408/*!50100 PARTITION BY KEY (a)
409PARTITIONS 7 */
410insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0);
411select * from t3;
412a
413-1
414-8388607
415-8388608
4160
4171
4188388604
4198388605
4208388606
4218388607
422select * from t3 where a=8388605;
423a
4248388605
425delete from t3 where a=8388605;
426select * from t3;
427a
428-1
429-8388607
430-8388608
4310
4321
4338388604
4348388606
4358388607
436drop table t3;
437create table t1 (a bigint unsigned not null, primary key(a)) engine='TokuDB'
438partition by key (a) (
439partition pa1 max_rows=20 min_rows=2,
440partition pa2 max_rows=30 min_rows=3,
441partition pa3 max_rows=30 min_rows=4,
442partition pa4 max_rows=40 min_rows=2);
443show create table t1;
444Table	Create Table
445t1	CREATE TABLE `t1` (
446  `a` bigint(20) unsigned NOT NULL,
447  PRIMARY KEY (`a`)
448) ENGINE=TokuDB DEFAULT CHARSET=latin1
449/*!50100 PARTITION BY KEY (a)
450(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = TokuDB,
451 PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = TokuDB,
452 PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = TokuDB,
453 PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = TokuDB) */
454insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
455select * from t1;
456a
4571
45818446744073709551612
45918446744073709551613
46018446744073709551614
46118446744073709551615
4622
46365535
464select * from t1 where a=-2;
465a
466delete from t1 where a=-2;
467select * from t1;
468a
4691
47018446744073709551612
47118446744073709551613
47218446744073709551614
47318446744073709551615
4742
47565535
476select * from t1 where a=18446744073709551615;
477a
47818446744073709551615
479delete from t1 where a=18446744073709551615;
480select * from t1;
481a
4821
48318446744073709551612
48418446744073709551613
48518446744073709551614
4862
48765535
488drop table t1;
489create table t2 (a bigint unsigned not null, primary key(a)) engine='TokuDB'
490partition by key (a) partitions 8;
491show create table t2;
492Table	Create Table
493t2	CREATE TABLE `t2` (
494  `a` bigint(20) unsigned NOT NULL,
495  PRIMARY KEY (`a`)
496) ENGINE=TokuDB DEFAULT CHARSET=latin1
497/*!50100 PARTITION BY KEY (a)
498PARTITIONS 8 */
499insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
500select * from t2;
501a
50218446744073709551612
50318446744073709551613
50418446744073709551614
50518446744073709551615
506select * from t2 where a=18446744073709551615;
507a
50818446744073709551615
509delete from t2 where a=18446744073709551615;
510select * from t2;
511a
51218446744073709551612
51318446744073709551613
51418446744073709551614
515delete from t2;
5161024 inserts;
517select count(*) from t2;
518count(*)
5191024
520drop table t2;
521create table t3 (a bigint not null, primary key(a)) engine='TokuDB'
522partition by key (a) partitions 7;
523show create table t3;
524Table	Create Table
525t3	CREATE TABLE `t3` (
526  `a` bigint(20) NOT NULL,
527  PRIMARY KEY (`a`)
528) ENGINE=TokuDB DEFAULT CHARSET=latin1
529/*!50100 PARTITION BY KEY (a)
530PARTITIONS 7 */
531insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
532select * from t3;
533a
534-1
535-9223372036854775807
536-9223372036854775808
5370
5381
5399223372036854775804
5409223372036854775805
5419223372036854775806
5429223372036854775807
543select * from t3 where a=9223372036854775806;
544a
5459223372036854775806
546delete from t3 where a=9223372036854775806;
547select * from t3;
548a
549-1
550-9223372036854775807
551-9223372036854775808
5520
5531
5549223372036854775804
5559223372036854775805
5569223372036854775807
557drop table t3;
558