Partitioning causes duplicate key error
I'm just trying out 5.1, largely because of the partitioning. I immediately run into a problem. Here's my definition:
CREATE TABLE `sentences` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`previous_entry` varchar(255) NOT NULL DEFAULT '',
`current_entry` varchar(255) NOT NULL DEFAULT '',
`next_entry` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `current_previous` (`current_entry`(31),`previous_entry`(31))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY(id) PARTITIONS 10;
The following works OK first time, and the id column ends up containing 1 as it should:
INSERT INTO sentences(previous_entry,current_entry,next_entry) values('a','b','c');
Next insert, though, I get a duplicate key error. If I remove the partitioning, the duplicate error does not occur and the autoincrement behaves as it should.
Is this a bug or have I done something wrong?