General Community > Site Comments, Issues and Concerns

Duplicate entry error in key 1

(1/2) > >>

KarterJK:
Hi to all,

For an update...please see my previous post on
SMF crashing MySQL database.
http://www.simplemachines.org/community/index.php?topic=10780.0

As reported .. after much work..all finally got corrected
All other new installed boards up and running ...
The old YabbSE boards are up and running

My Main Board...though
it only has 160 members and less than 1,000 posts
I did an upgradeĀ  following the instructions
and everything works great except for the following two errors

.... depicts directories

Trying to Repair boards
Database Error: Duplicate entry '292' for key 1
File: c:\.....\....\.....\yabbse\Sources\RepairBoards.php
Line: 119

and when I try to email my members

Database Error: Duplicate entry '6' for key 1
File: c:\....\....\....\yabbse\Sources\ManageMembers.php
Line: 876

As I stated prior... the conversion was great
everything works except these two items

how can one go about correcting the previously stated problem of the duplicate entry keys?

Thanks for you help

NOTE:
I dont believe the intitial problem actually layed within the MySQL 5.0 version
Strange on the very first attempt to install SMF
for a brand new board..that install did not act the same as post installs

In other words on the same day
I installed two new SMF boards for people
The first install was the one that kept crashing
The other was fine

Even after I changed MySQL 5.0 to 4.1 the first install crashed
I would delete the database and try to reinstall. 3 times I did this and it kept crashing
It wasnt until the last attempt that I used a different database filename that things went fine

** I suspect it was the initial install the caused all the problems to begin with






[Unknown]:
Probably this was caused by upgrading while running MySQL 5.  I recommend you try OPTIMIZE/REPAIR on the tables or restore a backup of the YaBB SE ones and upgrade again.

-[Unknown]

KarterJK:
Tried that this is the error I get back

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 5
File: c:\wwwroot\rjoclan\httpdocs\yabbse\Sources\Subs-Boards.php
Line: 228

when I use fix or repair this is what I get back except about 50 of them
all identical

Topic 0 has a bad first message: 8448
Topic 0 has a bad last message: 134874624
Topic 0 has a wrong number of replies: 2424840
Topic 0 has a bad first message: 8448
Topic 0 has a bad last message: 134874624
Topic 0 has a wrong number of replies: 2424840

using MySQL 4.1 version

for some reason ... this is the problem I had on my very first install
something I think about the very first entry...or very first record



Thanks

[Unknown]:
You shouldn't have any entries in any of the tables with ids of 0.  SMF assumes that 0 means "not there" and it can really screw things up badly.

Try this:

UPDATE prefix_topics
SET ID_TOPIC = NULL
WHERE ID_TOPIC = 0;

Did you have topics with ids of 0 in YaBB SE too?  Maybe this is a problem with running under MySQL 5...?

-[Unknown]

KarterJK:
no with YabbSE I never had any problems
actually I found MySQL 5.0 to very stable even moreso than 4.1
and faster.  I have been running it over 7 months with not a bit of problem.

I actually have ended up removing all of my SMF forums, sorry :(

and I replaced the MySQL 5.0 and all of my original files
and temporarily installing the YabbSE into the other websites
I had to get something up for them.

I am going to attempt another install of SMF under 5.0
and play around

I believe it all revolves around the very first install of SMF
something happened during that initial install and caused the problems
because it was only when they accessed that forum would things crash

Thanks anyway



Navigation

[0] Message Index

[#] Next page

Go to full version