Bug #43649 Falcon CHECK TABLE causes repair on entire tablespace + corruption
Submitted: 14 Mar 2009 11:21 Modified: 26 May 2010 17:52
Reporter: Philip Stoev Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0 OS:Any
Assigned to: Christopher Powers CPU Architecture:Any
Tags: F_HANDLER

[14 Mar 2009 11:21] Philip Stoev
Description:
According to Vlad, executing CHECK TABLE would actually cause a repair on the entire tablespace. This differs significantly from the desired behavior, which is to only check a specific table and take no action on it. Action should be taken only when REPAIR TABLE is explicitly requested.

In addition, Vlad reports that the repair procedure causes database pages to be erroneously freed, which in turn causes corruption.

This issue also prevents the RQG from safely issuing CHECK TABLE in order to verify the data after recovery. On the other hand, the Maria team has explicitly requested that CHECK TABLE is used after recovery on their tests.

How to repeat:
Examine the code. A RQG test may also be provided if needed.

Suggested fix:
* Disable CHECK TABLE until fixed, by returning "unsupported" instead;
* If possible, restrict the operation of CHECK|REPAIR TABLE to the table in question, and implement a separate command for operations on the entire tablespace;
* Make sure CHECK|REPAIR table does not free database pages that are actually in use, as reported by Vlad.