Commit b9448650 authored by Rich Prohaska's avatar Rich Prohaska

Tokutek/ft-engine#155 add a test case for the reorganize partition bug

parent e58e0ff0
DROP TABLE IF EXISTS `test`;
CREATE TABLE `test` (
`id` bigint(20) unsigned NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT '1985-01-19 09:00:00',
`col1` smallint(5) unsigned NOT NULL,
`col2` smallint(5) unsigned DEFAULT NULL,
`col3` smallint(6) DEFAULT NULL,
`col4` tinyint(4) DEFAULT NULL,
`col5` smallint(6) DEFAULT NULL,
`col6` tinyint(4) DEFAULT NULL,
`col7` smallint(6) DEFAULT NULL,
`col8` smallint(6) DEFAULT NULL,
`col9` smallint(6) DEFAULT NULL,
`col10` smallint(6) DEFAULT NULL,
`col11` smallint(6) DEFAULT NULL,
`col12` smallint(6) DEFAULT NULL,
`col13` tinyint(4) DEFAULT NULL,
`col14` int(11) DEFAULT NULL,
`col15` int(11) DEFAULT NULL,
`col16` tinyint(4) DEFAULT NULL,
`col17` smallint(6) DEFAULT NULL,
PRIMARY KEY (`id`,`timestamp`)
) ENGINE=TokuDB DEFAULT CHARSET=utf8 ROW_FORMAT=TOKUDB_LZMA
PARTITION BY RANGE (UNIX_TIMESTAMP(timestamp))
(PARTITION p201312 VALUES LESS THAN (1388563200) ENGINE = TokuDB,
PARTITION p201401 VALUES LESS THAN (1391241600) ENGINE = TokuDB,
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = TokuDB);
INSERT INTO `test` VALUES (138,'2013-11-04 10:47:01',2560,29952,-1025,-120,-12545,5,2560,3840,5120,6400,7680,0,3,-1761607678,419430400,-12,NULL),(138,'2013-11-04 10:47:02',62464,54017,-5633,-85,-3585,6,2816,4096,5376,6656,7936,1280,-110,50331673,419430402,-12,NULL),(138,'2013-11-04 10:47:03',24064,42497,-3585,-108,255,7,3072,4352,5632,6912,8192,2560,88,268435477,419430422,-12,NULL),(138,'2013-11-04 10:47:04',62464,54017,-5633,-90,4095,8,3328,4608,5888,7168,8448,3328,122,872415253,419430402,-12,NULL),(138,'2013-11-04 10:47:05',24064,42497,-3585,-46,8447,9,3584,4864,6144,7424,8704,3840,-38,-788529122,419430417,-12,NULL),(139,'2013-11-04 10:48:01',2560,29952,-1025,-120,-12545,5,2560,3840,5120,6400,7680,0,3,-1761607678,419430400,-12,NULL),(139,'2013-11-04 10:48:02',62464,54017,-5633,-85,-3585,6,2816,4096,5376,6656,7936,1280,-110,50331673,419430402,-12,NULL),(139,'2013-11-04 10:48:03',24064,42497,-3585,-108,255,7,3072,4352,5632,6912,8192,2560,88,268435477,419430422,-12,NULL),(139,'2013-11-04 10:48:04',62464,54017,-5633,-90,4095,8,3328,4608,5888,7168,8448,3328,122,872415253,419430402,-12,NULL),(139,'2013-11-04 10:48:05',24064,42497,-3585,-46,8447,9,3584,4864,6144,7424,8704,3840,-38,-788529122,419430417,-12,NULL),(140,'2013-11-04 10:49:01',2560,29952,-1025,-120,-12545,5,2560,3840,5120,6400,7680,0,3,-1761607678,419430400,-12,NULL),(140,'2013-11-04 10:49:02',62464,54017,-5633,-85,-3585,6,2816,4096,5376,6656,7936,1280,-110,50331673,419430402,-12,NULL),(140,'2013-11-04 10:49:03',24064,42497,-3585,-108,255,7,3072,4352,5632,6912,8192,2560,88,268435477,419430422,-12,NULL),(140,'2013-11-04 10:49:04',62464,54017,-5633,-90,4095,8,3328,4608,5888,7168,8448,3328,122,872415253,419430402,-12,NULL),(140,'2013-11-04 10:49:05',24064,42497,-3585,-46,8447,9,3584,4864,6144,7424,8704,3840,-38,-788529122,419430417,-12,NULL),(141,'2013-11-04 10:50:01',2560,29952,-1025,-120,-12545,5,2560,3840,5120,6400,7680,0,3,-1761607678,419430400,-12,NULL),(141,'2013-11-04 10:50:02',62464,54017,-5633,-85,-3585,6,2816,4096,5376,6656,7936,1280,-110,50331673,419430402,-12,NULL),(141,'2013-11-04 10:50:03',24064,42497,-3585,-108,255,7,3072,4352,5632,6912,8192,2560,88,268435477,419430422,-12,NULL),(141,'2013-11-04 10:50:04',62464,54017,-5633,-90,4095,8,3328,4608,5888,7168,8448,3328,122,872415253,419430402,-12,NULL),(141,'2013-11-04 10:50:05',24064,42497,-3585,-46,8447,9,3584,4864,6144,7424,8704,3840,-38,-788529122,419430417,-12,NULL),(142,'2013-11-01 07:00:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(142,'2013-11-01 07:00:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(142,'2013-11-01 07:00:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(143,'2013-11-04 08:00:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(143,'2013-11-04 08:00:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(143,'2013-11-04 08:00:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(144,'2013-11-04 18:47:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(144,'2013-11-04 18:47:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(144,'2013-11-04 18:47:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(144,'2013-11-04 18:47:04',62464,54017,-5633,-60,5375,10,3840,5120,6400,7680,8960,2048,-60,-1627389935,1207959552,-12,NULL),(144,'2013-11-04 18:47:05',24064,42497,-3585,-50,7935,11,4096,5376,6656,7936,9216,2304,-96,-738197487,570425345,-12,NULL),(144,'2013-11-04 18:47:06',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(144,'2013-11-04 18:47:07',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(144,'2013-11-04 18:47:08',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(144,'2013-11-04 18:47:09',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(145,'2013-11-04 18:50:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(145,'2013-11-04 18:50:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(145,'2013-11-04 18:50:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(145,'2013-11-04 18:50:04',62464,54017,-5633,-60,5375,10,3840,5120,6400,7680,8960,2048,-60,-1627389935,1207959552,-12,NULL),(145,'2013-11-04 18:50:05',24064,42497,-3585,-50,7935,11,4096,5376,6656,7936,9216,2304,-96,-738197487,570425345,-12,NULL),(145,'2013-11-04 18:50:06',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(145,'2013-11-04 18:50:07',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(145,'2013-11-04 18:50:08',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(145,'2013-11-04 18:50:09',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(146,'2013-11-05 07:59:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(146,'2013-11-05 07:59:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(146,'2013-11-05 07:59:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(147,'2013-12-01 07:59:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(147,'2013-12-01 07:59:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(147,'2013-12-01 07:59:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(148,'2013-11-04 18:47:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(148,'2013-11-04 18:47:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(148,'2013-11-04 18:47:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(148,'2013-11-04 18:47:04',62464,54017,-5633,-60,5375,10,3840,5120,6400,7680,8960,2048,-60,-1627389935,1207959552,-12,NULL),(148,'2013-11-04 18:47:05',24064,42497,-3585,-50,7935,11,4096,5376,6656,7936,9216,2304,-96,-738197487,570425345,-12,NULL),(148,'2013-11-04 18:47:06',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(148,'2013-11-04 18:47:07',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(148,'2013-11-04 18:47:08',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(148,'2013-11-04 18:47:09',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(149,'2013-11-04 18:50:01',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(149,'2013-11-04 18:50:02',62464,54017,-5633,-80,-7425,8,3328,4608,5888,7168,8448,768,14,-939524074,771751937,-12,NULL),(149,'2013-11-04 18:50:03',24064,42497,-3585,-70,2815,9,3584,4864,6144,7424,8704,1792,82,1694498837,419430401,-12,NULL),(149,'2013-11-04 18:50:04',62464,54017,-5633,-60,5375,10,3840,5120,6400,7680,8960,2048,-60,-1627389935,1207959552,-12,NULL),(149,'2013-11-04 18:50:05',24064,42497,-3585,-50,7935,11,4096,5376,6656,7936,9216,2304,-96,-738197487,570425345,-12,NULL),(149,'2013-11-04 18:50:06',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(149,'2013-11-04 18:50:07',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(149,'2013-11-04 18:50:08',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(149,'2013-11-04 18:50:09',2560,29952,-1025,-120,-9985,7,3072,4352,5632,6912,8192,256,34,2063597570,167772160,-12,NULL),(210,'2013-12-16 02:13:44',2560,29952,-1025,-44,-12545,1,512,1024,23040,3328,6144,0,-56,1610612736,16777217,-12,NULL),(210,'2013-12-16 02:13:45',62464,54017,-5633,-50,-2305,5,768,1792,23808,15616,4096,2048,-86,704643091,167772169,-12,NULL),(210,'2013-12-16 02:13:46',24064,42497,-3585,-110,255,60,1792,3328,-30720,6656,16128,2816,-76,570425441,402653202,-12,NULL),(210,'2013-12-16 02:13:47',62464,54017,-5633,-60,2815,-106,2816,6400,8704,18433,4096,3328,31,2046820434,587203975,-12,NULL),(210,'2013-12-16 02:13:48',24064,42497,-3585,116,8703,94,3329,6912,-30208,24065,3584,3840,29,654311504,1207959566,-12,NULL),(211,'2013-12-16 15:13:44',2560,29952,-1025,-44,-12545,1,512,1024,23040,3328,6144,0,-56,1610612736,16777217,-12,NULL);
create table test_copy like test;
insert into test_copy select * from test;
include/diff_tables.inc [test, test_copy]
drop table test,test_copy;
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment