Hi Victor,
To answer your question about saving the table.
This URL http://dev.mysql.com/doc/refman/5.6/en/myisam-repair.html - "*Stage
3: Difficult repair*" directly addresses your concerns.
You also may want to look into different option of REPAIR TABLE command
http://dev.mysql.com/doc/refman/5.6/en/repair-table.html to see if extended
or form only option can be used to restore your table
Regards,
Mikhail Berman
On Sat, Mar 10, 2012 at 12:38 PM, Victor Danilchenko
<victor@stripped>wrote:
> 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.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql
>
>
--
Mikhail Berman