0

I have a MySQL MyISAM table that's corrupt. It first showed up in my mysql log as:

[ERROR] /usr/sbin/mysqld: Table './mydb/mytable' is marked as crashed 
and last (automatic?) repair failed

I then ran CHECK TABLE on it, and after churning away for well over an hour, I got this:

+--------------+-------+----------+----------------------------------------------------------+
| Table        | Op    | Msg_type | Msg_text                                                 |
+--------------+-------+----------+----------------------------------------------------------+
| mydb.mytable | check | warning  | Table is marked as crashed and last repair failed        |
| mydb.mytable | check | warning  | 5 clients are using or haven't closed the table properly |
| mydb.mytable | check | warning  | Size of indexfile is: 215237632      Should be: 4096     |
| mydb.mytable | check | error    | Record-count is not ok; is 4212263   Should be: 0        |
| mydb.mytable | check | warning  | Found 48 deleted space.   Should be 0                    |
| mydb.mytable | check | warning  | Found 1 deleted blocks       Should be: 0                |
| mydb.mytable | check | warning  | Found 8362327 key parts. Should be: 0                    |
| mydb.mytable | check | error    | Corrupt                                                  |
+--------------+-------+----------+----------------------------------------------------------+

Does all this indicate that this table is too far gone to be salvageable? Or should REPAIR TABLE still work? Or are there other options to fix this table without replacing the data? I'm asking first because this table is pretty huge for my system and I have a feeling that it's going to take a loooong time to know if repair is going to work.

2
  • The output above suggests that MySQL believes the table "Should be" empty. I hope you had backups. Feb 26, 2014 at 3:47
  • Actually, REPAIR TABLE worked nicely, and quicker than I thought.
    – curtisdf
    Feb 26, 2014 at 4:34

1 Answer 1

1

I proceeded with REPAIR TABLE anyway, figuring that if the table was already too far gone, I had nothing else to lose. Thankfully, it worked! The table is back up and functioning normally.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .