Bug #38749 Duplicate error on INSERT - primary key auto increment column
| Submitted: | 12 Aug 2008 11:39 | Modified: | 13 Aug 2008 18:29 |
|---|---|---|---|
| Reporter: | Alok Sharma | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S1 (Critical) |
| Version: | 5.0.51a-6 | OS: | Linux (debian lenny) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | duplicate primary key, insert error | ||
[12 Aug 2008 11:39]
Alok Sharma
[12 Aug 2008 12:07]
Susanne Ebrecht
Many thanks for writing a bug report. Unfortunaltely I can't repeat this with MySQL 5.0.68. Neither with MyISAM nor with InnoDB. Which storage engine do you use? Can you provide a short test case. Please also try our actual version MySQL 5.0.67.
[13 Aug 2008 7:22]
Alok Sharma
Pleased to see such a quick reply. This happened after some days of use of the database. It had been working fine for quite some time, but yesterday, it suddenly gave the above error. I will try the versions you mentioned, but as I said, I'm not sure I'll be able to replicate the error easily. After the initial error, refusing to add a row to the table claiming the primary key violation, today, it tells me the table is marked as crashed: ERROR 145 (HY000): Table './prajayathna/school_learning_ksqa' is marked as crashed and should be repaired I was able to recover it using: Use myisamchk -r tbl_name
[13 Aug 2008 8:10]
Susanne Ebrecht
I will close the bug report because the issue was because of broken table and is not a bug.
[13 Aug 2008 9:48]
Alok Sharma
I'm not sure the issue is because of a broken table, since the "table is crashed" error was *not* showing when the duplicate entry error happened. I was able to do a desc of the table *after* the failed INSERT attempt. It was only this today, several hours later, that when I tried to do a desc of the same table, I got the above error saying the table is crashed.
[13 Aug 2008 18:29]
Sveta Smirnova
Thank you for the feedback. "I'm not sure the issue is because of a broken table, since the "table is crashed" error was *not* showing when the duplicate entry error happened. I was able to do a desc of the table *after* the failed INSERT attempt." I also believe this is because of crashed table. Next time if same problem happens please run CHECK TABLE and if this command returns no error reopen the report.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
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.