Advertisement:
NameCheap

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002725SMF 2.0public2008-11-05 15:062008-12-01 15:47
ReporterOldiesmann 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
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.
TagsRC1
Attached Files

- Relationships

-  Notes
(0006235)
Oldiesmann (Developer)
2008-11-30 16:35

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.
(0006242)
Compuart (SMF Friend)
2008-12-01 15:47

 ! 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 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group