Quote:
Originally Posted by Paul M
Thats some sort of mysql problem/bug - it should be impossible to get a duplicate key error using RELACE INTO - the whole point is that it updates the found key - I would suggest you run a repair on the guest table, it may be corrupt in some way.
|
Sure the reason was corrupted guest table, and after repairing SQL everything is ok.
My thought was to find a way to escape such a situation again.
I think the scenario is - during database backup, which is hard staff for server, the REPLACE comes and mysql starts to writes the data, but it do not mark it as finished and send any answer to your script for a long time and same request comes once more. Then one have same REPLACE query doubble in query.