我的表名builds
看起来很像
CREATE TABLE `builds` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`testplan_id` int(10) unsigned NOT NULL DEFAULT '0',
`name` varchar(100) NOT NULL DEFAULT 'undefined',
`creation_ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`testplan_id`,`name`),
KEY `testplan_id` (`testplan_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2074288 DEFAULT CHARSET=utf8'
我想基于creation_ts在构建上创建分区。我正在尝试
Alter Table builds PARTITION BY RANGE (TO_DAYS(creation_ts))
( PARTITION p1 values less than (TO_DAYS('2015-05-07'))
在phpMyadmin中但它显示错误“无法识别的alter operation”; 我使用的是MYSQL Server版本:5.7.11。