We (apparently) had poorly executed of our Solaris MySQL database engine last night. At least some of the InnoDB tables are corrupted, with timestamp out of order errors in the transaction log, and a specific error about the index being corrupted.
We know about the tools available for MyISAM table repairs, but cannot find anything for InnoDB.
Side note: attempting a table optimize (in my attempt to rebuild the corrupted index) causes the database server to crash.
InnoDB corruption. Most InnoDB corruptions are hardware-related. Corrupted page writes can be caused by power failures or bad memory. The issue also can be caused by using network-attached storage (NAS) and allocating InnoDB databases on it.
If you need to rebuild an InnoDB table because a CHECK TABLE operation indicates that a table upgrade is required, use mysqldump to create a dump file and mysql to reload the file.
First of all stop the server and image the disc. There's no point only having one shot at this. Then take a look here.
stop your application...or stop your slave so no new rows are being added
create table <new table> like <old table>; insert <new table> select * from <old table>; truncate table <old table>; insert <old table> select * from <new table>;
restart your server or slave
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With