Hi all,
I was upgrading some web software on my server, and its upgrade
involved upgrading its database. After the upgrade, the following error
started appearing:
mysqldump: Got error: 1034: Incorrect key file for table 'notes'; try to
repair it when using LOCK TABLES
So i tried doing lock and repair:
mysql> LOCK TABLES notes WRITE;
ERROR 1034 (HY000): Incorrect key file for table 'notes'; try to repair it
mysql> REPAIR TABLE notes\G
*************************** 1. row ***************************
Table: sugar.notes
Op: repair
Msg_type: Error
Msg_text: Incorrect key file for table 'notes'; try to repair it
*************************** 2. row ***************************
Table: sugar.notes
Op: repair
Msg_type: error
Msg_text: Corrupt
2 rows in set (0.00 sec)
So i tried stopping mysql server and running myisamchk:
# myisamchk --verbose --force--update-state --key_buffer_size=64M
--sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M
~mysql/sugar/notes.MYI
# myisamchk --verbose notes
Checking MyISAM file: notes
Data records: 9519 Deleted blocks: 0
- check file-size
- check record delete-chain
No recordlinks
- check key delete-chain
block_size 1024:
block_size 2048:
block_size 3072:
block_size 4096:
- check index reference
- check data record references index: 1
- check data record references index: 2
- check data record references index: 3
- check data record references index: 4
- check record links
but the error is still there, even though myisamchk apparently sees
nothing wrong!
is there any way to save this table? it was a result of an upgrade that
took about 24 hours to run, so I really don't want to re-do it from scratch.
many thanks in advance for any sage advice.