MySQL Forums
Forum List  »  Partitioning

Re: Partitioning causes duplicate key error
Posted by: Mikael Ronström
Date: May 24, 2006 05:06AM

Hi,
I tried this in the latest 5.1 tree (BitKeeper version) and it had no
problem. Most likely you are hitting BUG #18753 which was fixed
in 5.1.10. I think 5.1.10 is not out yet so if you need to check this
you probably have to use a software version of 5.1.

Rgrds Mikael

Jan Hansen wrote:
> 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?

Mikael Ronstrom
Senior Software Architect, MySQL AB
My blog: http://mikaelronstrom.blogspot.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Partitioning causes duplicate key error
2265
May 24, 2006 05:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.