Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason, it's not the first thing I think of when diagnosing very strange table errors. I had an issue when doing an order by I'd wind up with only one record. Explain said I should have 28 rows, if I take out the order by I have 28 rows. Well, the problem was table corruption, but unlike some errors where MySQL goes right out and tells you your table is corrupt, I didn't know until I checked it.

I was just wondering if there is a list, or we could make a list of all the times when a MySQL database is corrupted, but you might not necessarily know it is.

share|improve this question

2 Answers 2

Fatal errors when trying to read/write to a table is the evidence in most of the cases I've run into.

Also, EXPLAIN only provides an estimated number of rows, so I wouldn't necessarily consider an EXPLAIN output with an unexpected number of rows read/returned as an indication of table corruption.

share|improve this answer

Run CHECK TABLE on the table.

share|improve this answer
    
Yep, that's what I did. I was just wondering if there was a list of warning signs that might give me an indication that I need to run check table –  Peter Turner Oct 29 '10 at 18:28
1  
Many people monitor the log results of mysqlcheck regularly (daily, weekly, monthly) as a part of database maintenance. It frees space, optimizes indexes, and is proactive against corruption. –  andyhky Oct 29 '10 at 20:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.