Anonymous Login
04-20-2018 11:45 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002725SMF 2.0public2008-12-01 15:47
PrioritynormalSeverityminorReproducibilityhave not tried
Summary0002725: "Find and Repair Errors" can cause "duplicate key" errors...
DescriptionIn rare instances, the "find and repair errors" functionality can lead to a "duplicate key" error. When posting a new topic, if SMF is unable to update the topic ID for the first post in the new topic, you end up with the following:

id_topic of 0 for the affected message
topic in the topics table that has an id_first_msg matching that of a stranded post

The Find and Repair Errors functionality does check for all posts that have an invalid topic ID. However, it does not account for this particular situation, and instead attempts to create a new topic for the post either in the salvage board or in the board that the post is supposed to be in. Because there's a unique key set on the "id_first_msg" and "id_board" columns, you would end up having two rows with the same id_first_msg and id_board values.
Additional InformationThis issue affects both 1.1 and 2.0, but I'm not sure it's worth fixing for 1.1. It should definitely be fixed for 2.0 final though.
Attached Files




Oldiesmann (Developer)

Tagging this with RC1 as I think it's important enough that it should be fixed for RC1. It should definitely be fixed before 2.0 final is out.


Compuart (SMF Friend)

 ! Prevent a duplicate key error from occuring in case the message being salvaged was already part of an existing topic. (RepairBoards.php) Revision 7666
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group