Due to MySQL InnoDB handling of sequences, archiving doesn't work in this case (there may be other problems too):
- Create a chat and post a few messages (if you have none).
- Archive all chats (this empties the chatroom_msg table).
- Restart MySQL
- Create a new chat, post a few messages, then archive it.
user warning: Duplicate entry '3' for key 1 query: INSERT INTO chatroom_msg_archive (cmid, ccid, uid, msg_type, msg, session_id, recipient, modified) SELECT * FROM chatroom_msg WHERE ccid = 21 in /home/cmyers/svn_workspace/billy_trunk/includes/database.mysql.inc on line 174.
With InnoDB sequences are not stored on disk, so restarting MySQL when the chatroom_msg table is empty initializes the AUTO_INCREMENT value to 1. The next messages posted get cmid's of 1,2,3,4... while these keys already exist in the chatroom_msg_archive table.
Comments
Comment #1
Anonymous (not verified) commentedi'm not really interested in fixing bugs in the 5.x branch, but i'm willing to help anyone who provides patches to do so.
care to roll a patch?
Comment #2
cedarm commentedWe're not really developing our 5.x sites any more, so no. Sorry.
Comment #3
Anonymous (not verified) commentedok, thanks for the reply. i'm going to "won't fix" this, if anyone wants to work on this, please reopen it.