I have a MySQL table (with data):
CREATE TABLE IF NOT EXISTS `lc6_words` (
`jp_wkey` BIGINT NOT NULL AUTO_INCREMENT,
`jp_word` varchar(255) NOT NULL,
`jp_fcharascii` INT NOT NULL,
`jp_word_occ` BIGINT NOT NULL DEFAULT 1,
UNIQUE(`jp_word`),
PRIMARY KEY (`jp_wkey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
I want to add partitions in it (by altering):
ALTER TABLE lc6_words PARTITION BY RANGE COLUMNS(jp_fcharascii)(
PARTITION pw2486 VALUES LESS THAN (2486),
PARTITION pw2487 VALUES LESS THAN (2487),
PARTITION pw2488 VALUES LESS THAN (2488),
PARTITION pw2489 VALUES LESS THAN (2489),
PARTITION pwmax VALUES LESS THAN (MAXVALUE)
);
I'm getting the error:
Error Code: 1503. A PRIMARY KEY must include all columns in the table's partitioning function
MySQL version: 5.7.19 / Win 10 64bit
Any way around to implement the partition keeping the table structure intact? Thanks in advance.