Duplicate entry problem

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
Guest

Duplicate entry problem

Post by Guest » Wed 24 Aug 2005 22:39

I have a simple table that has an INT primary key that is set to auto-increment. It has one other VARCHAR field. Whenever I add a row, and then click off it to commit it, I get dialog that says "Duplicate entry '2' for key 1". The record is added, but it's not visible until I refresh the data. Is this a known issue, or does anyone know of a workaround for this?

Duke
Devart Team
Posts: 476
Joined: Fri 29 Oct 2004 09:25

Post by Duke » Thu 25 Aug 2005 14:54

We cannot reproduce the problem so we need additional information.
1. Could you give us the table script?
2. Is table empty or not?

andreim
Posts: 11
Joined: Mon 29 Aug 2005 14:56
Location: Miami, FL

Duplicate entry problem

Post by andreim » Mon 29 Aug 2005 15:04

I have the same problem. The message pops up every time I insert a new row - both to an empty table or to a table with records. Here is the table script:

CREATE TABLE cms.accounttypes (
accounttype_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,
accounttype VARCHAR(20) NOT NULL,
PRIMARY KEY (accounttype_id)
)
TYPE=InnoDB
AUTO_INCREMENT=4

(The table already has 3 records in it)

Duke
Devart Team
Posts: 476
Joined: Fri 29 Oct 2004 09:25

Post by Duke » Tue 30 Aug 2005 12:28

We have reproduced the problem and we'll work on the solution.

Duke
Devart Team
Posts: 476
Joined: Fri 29 Oct 2004 09:25

Post by Duke » Thu 08 Sep 2005 10:04

We have fixed the problem. Look forward for the next build.

Post Reply