Today a former customer of mine called with a strange problem. A program I once wrote was popping up error messages, reporting: duplicate entry '17631' for key 1
I checked all database tables for duplicate IDs but there were none. Strange. One table contained an ID-value of 17631, though, and I thought maybe the table index is broken. I tried to rebuild the index using mysql's
REPAIR TABLE .. QUICK function. That didn't help. I did a backup and deleted the value in question. Didn't help either.
Being on the phone with the customer all the time, he tells me the server had been unstable lately. I decided to repair all tables' indices.
That helped. :-)