Assertion Failure Errors in InnoDB Tables
Consider an instance, you try to access MySQL database table stored on InnoDB storage engine and it crashes. After this, when you view the crash log report, it gives you the similar error messages:
"InnoDB: Assertion failure in thread in file line "
InnoDB tables are created in a tablespace. The above error message further describes that if you get repeated assertion failures and crashes, the InnoDB tablespace might be corrupted.
Cause
You might similar errors, as above, if one of the below conditions is true:
One or more libraries, against which the database is linked, are damaged, misconfigured or incorrectly built
Hardware faults
Table is damaged
Solution
Try troubleshooting the above behavior by following these steps:
Make sure that all the libraries are properly configured. Reinstall them, if required
Diagnose the system for possible hardware issues. Refer to system, application and MySQL error logs for corresponding hardware issues related entries
To repair database table, use these steps in order:
Execute CHECK TABLE command to check the table for corruption errors:
CHECK TABLE tablename
If the above check gives corruption results, you need to repair the damaged table:
REPAIR TABLE tablename
If applying the above measures doesn't help, you should restore from backup.
If no clean backup is available, use MySQL Recovery utilities. MySQL Database Recovery tools scan corrupted database and repair it by providing graphically rich user interface.
Stellar Phoenix Database Recovery For MySQL is a comprehensive utility that repairs and restores damaged MySQL databases. It repairs files created with InnoDB (.ibdata, .ibd and .frm) and MyISAM (.myd, .myi and .frm) database storage engines. It is read-only tool that supports MySQL 5.x. This MySQL Recovery is compatible with Windows Vista, XP, 2003, and 2000. It can repair databases created with both Windows and Linux platforms.