eyt*
August 3, 2006

Corrupted Comments Table...

I was recently cleaning up the endless comment spam this blog gets, and at some point while doing this, I noticed that one comment ended up not being deletable. From the bBlog admin interface, it was not evident that there was a problem, and I decided to look at it when I got home. When I got home, I had received a couple more comment spams, but I could not delete these or the previous one from the admin interface, and so I decided to drop to the mysql interface.

The mysql interface seemed fine at first, as it allowed me to select * from bB_comments, however, when I attempted to delete all the items on hold, I noticed something different:

  • mysql> delete from bB_comments where onhold = 1;
  • ERROR 126 (HY000): Incorrect key file for table './bBlog_table/bB_comments.MYI'; try to repair it

Some of my initial search results were non-conclusive as to what the deal was, and so I hoped that by restarting MySQL, that the error would be more evident. MySQL started up fine, but my query results now were different:

  • mysql> delete from bB_comments where onhold = 1;
  • ERROR 145 (HY000): Table './Blog/bB_comments' is marked as crashed and should be repaired

From that error message, I landed on this message that indicated that the repair was as simple as running the REPAIR query, as described here:

  • mysql> REPAIR Table bB_comments;
  • +-------------------------+--------+----------+----------+
  • | Table | Op | Msg_type | Msg_text |
  • +-------------------------+--------+----------+----------+
  • | bBlog_table.bB_comments | repair | status | OK |
  • +-------------------------+--------+----------+----------+

And now I am back in business and able to delete my comment spam. It is unclear what corrupted the table to begin with; I was impatient in deleting the comment spam, but I doubt that is the root cause. If it happens again, I will take a look.


Posted 15 years, 10 months ago on August 3, 2006
The trackback url for this post is http://www.eyt.ca/blog/bblog/trackback.php/130/

Comments have now been turned off for this post. If you want to share something, please e-mail me.

Navigation

Recent Posts

eyt*