Mysql – Any tools to simulate innodb crash for innodb_force_recovery levels 1-6

innodbMySQL

I am curious if there's any tools out there or methods to simulate mysql innodb crashes which would test and require the use of each of the 6 levels of innodb_force_recovery 1-6 http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html ?

What would I need to do to replicate each level of crash recovery ?

cheers

Best Answer

I use bvi to corrupt a tablespace. However you need to know InnoDB files format and how InnoDB works in order to make it start with particular recovery level. For example, for level 1 you need to change a checksum. For 3 - corrupt UNDO and so on.