[ZBX-6355] Background image upload fails with "Duplicate entry xx for key PRIMARY" Created: 2013 Mar 06 Updated: 2017 May 30 Resolved: 2013 Mar 06 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.5 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Jens Berthold | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | database, images, import, upload | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 6.0.3 |
Description |
When trying to upload a background image, I get the following error: Looking into table "images" shows me that the last image with imagetype "2" (background) has imageid 41. So it seems to me the import logic does something like "select imageid from images where imagetype = 2" instead of "select imageid from images". |
Comments |
Comment by richlv [ 2013 Mar 06 ] |
select * from ids where table_name='images'; |
Comment by Jens Berthold [ 2013 Mar 06 ] |
Yes, meanwhile I also found it by crawling through the code. I changed the "nextid" in the database (which doesn't hold the next, but the highest currently used id) and now it works. |
Comment by Jens Berthold [ 2013 Mar 06 ] |
Closing the issue as it was a specific fault in my database and I cannot tell if that was Zabbix' fault or my own. |