我正在尝试使用以下 RANGE 函数创建分区表
CREATE TABLE `fact_events` (
`event_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`event_type_key` tinyint(3) unsigned NOT NULL,
`analytic_file_id` bigint(20) unsigned NOT NULL ',
`sdk_session_id` bigint(20) unsigned NOT NULL,
`virtual_button_create_id` bigint(20) unsigned NOT NULL C,
PRIMARY KEY (`event_key`),
KEY `idx_events_event_type` (`event_type_key`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8
PARTITION BY RANGE(FLOOR(event_key/100000))
PARTITION p0 VALUES LESS THAN (0),
PARTITION p1 VALUES LESS THAN (1),
PARTITION p2 VALUES LESS THAN (2),
PARTITION p3 VALUES LESS THAN (3),
PARTITION p4 VALUES LESS THAN (4),
PARTITION p513 VALUES LESS THAN MAXVALUE
)
我不断得到
ERROR 1564 (HY000): This partition function is not allowed
欢迎任何想法谢谢