Bug #52991 Selecting 'Force Recovery' results in Storage Engine Error with INNODB Tables
Submitted: 20 Apr 2010 15:38 Modified: 21 Apr 2010 13:41
Reporter: Paul Rudge Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S4 (Feature request)
Version:5.2.19 Beta OS:Windows (XP SP3)
Assigned to: CPU Architecture:Any
Tags: Force Recovery, storage engine

[20 Apr 2010 15:38] Paul Rudge
Description:
If the variable is selected innodb_force_recovery (any value), then when editing table data the following error occurs:

ERROR 1030: Got error -1 from storage engine

Remove the option and data can now be edited.

Bug may not have been caught since the default is OFF

How to repeat:
With defaults innodb_force_recovery is NOT set.

1. Create schema, add table and insert data - commit. NO ERROR.

2. Stop Instance.

3. Modify my.ini file to add the variable: innodb_force_recovery=4

4. Restart instance to reinitialise the variables.

5. Upon Commit of any data change, error occurs requiring rollback.

Suggested fix:
Possible due to new INNODB engine compatability.
[20 Apr 2010 15:43] Valeriy Kravchuk
Please, read the manual, http://dev.mysql.com/doc/refman/5.5/en/forcing-recovery.html:

"The database must not otherwise be used with any nonzero value of innodb_force_recovery. As a safety measure, InnoDB prevents users from performing INSERT, UPDATE, or DELETE operations when innodb_force_recovery is greater than 0.

You can SELECT from tables to dump them, or DROP or CREATE tables even if forced recovery is used."
[21 Apr 2010 12:05] Paul Rudge
Sorry, did not fully understand the INNODB implications.

I suggest that perhaps a Warning appears if trying to set > 0 in Workbench.
[21 Apr 2010 12:11] Paul Rudge
Change of Status in line with comments
[21 Apr 2010 13:41] Valeriy Kravchuk
Yes, it would be nice to get a warning in this case.