Duplicate entry '8358500' for key 'PRIMARY' File: c:\htdocs\smf\Sources\Subs-Pos

Started by comesee, January 06, 2014, 02:56:51 PM

Previous topic - Next topic

comesee

i have this error. how do i solve it.


Duplicate entry '8358500' for key 'PRIMARY'
File: c:\htdocs\smf\Sources\Subs-Post.php
Line: 2002

Kindred

And what are you trying to DO when you see this error?

Information rather than puzzles, please.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Kindred

wow....  with that many posts, one would assume that your would know how we react to single line answers with no actual details.

SMF version?
URL?
Mods installed?


The error is actually very clear...   hen the system tries to write the new post to your database, it gets an error because the post number is too high and 8358500 has already been used. Since I tend to DOUBT that you actually have 8 million posts...   and this does not happen in a standard install, We have to assume that something which you did to your system has screwed up your site.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

comesee

i have more than 8 million post.  i did not do anything. when it get to this point. i get this error. so i go back to my backup...

how do i correct duplicate key using sql

Kindred

Quote from: Kindred on January 06, 2014, 09:11:10 PM
wow....  with that many posts, one would assume that your would know how we react to single line answers with no actual details.

SMF version?
URL?
Mods installed?

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

this is basically a duplicate of http://www.simplemachines.org/community/index.php?topic=512432 and i would assume http://www.simplemachines.org/community/index.php?topic=454865

if you cant manage to give us details of what is going on no one will ever be able to help you solve your problem.


Illori

we will say it one more time. you need to provide us with MUCH more information or we will NEVER be able to assist you to solve your issue.

comesee

i said, when i post. I get that error.. That all.

I have seen it happen before several times.

What is the sql to correct  the error.

THis is an sql solution. I have tried several alternative sql method, it does not work.

Kindred

and see, that is your problem.
You are assuming things which may or may not be true.

You have not answered any of my actual questions.
SMF version?
Mods installed?
URL?

I will add one as well -- What "alternative sql methods" have you tried?

because, as I said in one of your other threads, there is an SMF site out there with over 50 million posts... and they don't have this issue.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

comesee

Forum version: SMF 2.0.4

the mod is not the reason why it is, it get to this point and i notice the id_topic is set to just 8. i think this is where the problem. it got to the maximum.

margarett

The (8) is irrelevant for the field size. It's the type of integer that might cause you issues. What type is that?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

Hummm... Can you paste here some lines around line 2002 from Subs-Post.php? I've been looking at it and the issue might be elsewhere...

Also, please update your forum to latest version ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Chen Zhen

comesee,

  We need to see the code from that line so it would be best for you to post it within bbc code tags here in this thread. The reason is because when you install mods they can displace the code compared to what would be at that line in a default file. Also it could be code from a mod itself in which case we will have no idea what it is without looking at it. You should also list any post related mods that you have installed on your forum.

  Whatever db column is throwing the error, it sounds as though it is set to a signed mediumint but the integer you posted is ever so slightly below that limit which seems puzzling atm. If that were the case & negative values for said db column were not necessary, adjusting it to unsigned will solve your dilemma. If negative values are necessary in that column, it will need to be changed to signed int. We need more info to give you a proper answer else we are just throwing guesses.

MySQL integer types comparison: http://dev.mysql.com/doc/refman/5.0/en/integer-types.html
 



   

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Advertisement: