突然、MySQLのテーブルのデータがselectできなくなった(‘A`) 。
もしかして、MyISAMのテーブルがぶっとんだのか?
グーグル先生でmyisamchkというものを発見したので使ってみた。
# myisamchk db/daily_report.MYI
Checking MyISAM file: db/daily_report.MYI
Data records: 69451 Deleted blocks: 0
myisamchk: warning: 2 clients are using or haven’t closed the table properly
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check record links
MyISAM-table ‘db/daily_report.MYI’ is usable but should be fixed
これは、データは残ってるけど読み出せない状態になっているという
ことなのかな・・・・・
とりあえず、壊れているテーブルをダンプしてリストアしたら
selectできるようになったが、解決方法としては良かったのかな・・・・。