Jump to content

Sql error about dublicate entry


Recommended Posts

Hello

I get daily about 25 errors like this:

===================================================
Date: Tue, 22 Feb 2011 23:15:36 +0200
Error Number: 1062
Error: Duplicate entry '85-112243' for key 'marker_forum_id'
IP Address: 62.152.27.155
mySQL query error: INSERT INTO ibf_topic_markers (marker_unread,marker_topics_read,marker_last_update,marker_member_id,marker_forum_id) VALUES(1248,'a:0:{}',1298409336,112243,85)
===================================================

Any ideas what is causing this and how to fix it?

Thank you

Link to comment
Share on other sites


Hello



I get daily about 25 errors like this:



===================================================


Date: Tue, 22 Feb 2011 23:15:36 +0200


Error Number: 1062


Error: Duplicate entry '85-112243' for key 'marker_forum_id'


IP Address: xxxxxxxx


mySQL query error: INSERT INTO ibf_topic_markers (marker_unread,marker_topics_read,marker_last_update,marker_member_id,marker_forum_id) VALUES(1248,'a:0:{}',1298409336,112243,85)


===================================================



Any ideas what is causing this and how to fix it?



Thank you




The topic_markers is not a default table in Ipb 3.1.4. SO my guess is it is added either by a mod or you are using an older version of Ipb. Anyway, it looks like the marker_forum_id field it already exists in the topic_markers table so when that qyery is run it tries to add it again. Make first a backup of that table and then drop the marker_forum_id field and see if it would help.

P.s. You might also wantt o remove your ip address from the error message for privacy/security reasons.
Link to comment
Share on other sites


The ip is fake :)



It is for the ipb 2.3.x that is using this table.




But i don't know why i got this error....



Let's hope anyone else can help....




Ah, ok. Personally I am not familiar with the 2.3.x versions. Hopefully someone who is can help you further with this.

P.s. Did you drop that field I mentioned?
Link to comment
Share on other sites


No as i am afraid the results.



I am waiting for someone to tell me what is this for and what happend if i delete this or is another way to fix it.



Thanks for your help :)




I explained at my previous post why I suggested the deletion of that field :)

If you make a backup of that table first as I adviced, then all you have to do in case something will go wrong, is to restore it again. But I understand your hesitation.
Link to comment
Share on other sites

That part of the code (in v2.3.6) is building a set of read/unread topic markers. The idea is that a visitor viewing a forum can see which topics they have read or not, and any that have been changed since they last looked. The error is caused by the code trying to add a row of markers for member 112243 for forum number 85. It is trying to insert a row, but the row is already there. This is possibly caused by a previous MySQL crash.

To get rid of this error it *should* *** UNTESTED *** be safe to run this query (after backing up your database):

DELETE FROM ibf_topic_markers WHERE marker_member_id = 112243 AND marker_forum_id = 85;



It will mean that the next time visitor 112243 looks in forum 85, all the topics will look as though they have never been read, but at least it will get rid of the error.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...