Bug #37527 mysqlcheck fails to report entire database when InnoDB frm file corruption
Submitted: 19 Jun 2008 16:48 Modified: 8 Dec 2008 17:02
Reporter: Kyle Joiner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.0.46 OS:Any
Assigned to: Ramil Kalimullin CPU Architecture:Any
Tags: frm, innodb, mysqlcheck

[19 Jun 2008 16:48] Kyle Joiner
Description:
When using mysqlcheck to check tables, if an innodb table's frm file is cleared (all data removed but file still exists) mysqlcheck will not report on the entire database the table is contained in.  CHECK TABLES  correctly identifies the table corruption

How to repeat:
Create a table with InnoDB engine.   Open the tables frm file in a text editor and delete the contents and save.  Run mysqlcheck against the database.
[18 Aug 2008 7:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/51821

2666 Ramil Kalimullin	2008-08-18
      Fix for bug#37527: mysqlcheck fails to report entire database 
      when InnoDB frm file corruption
      
      Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists.
      The query may fail for some reasons (e.g. null .frm file) then
      mysqlcheck doesn't process the database tables.
      
      Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed.
[14 Nov 2008 7:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/58719

2714 Ramil Kalimullin	2008-11-14
      Fix for bug#37527: mysqlcheck fails to report entire database 
      when InnoDB frm file corruption
      
      Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists.
      The query may fail for some reasons (e.g. null .frm file) then
      mysqlcheck doesn't process the database tables.
      
      Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed.
[2 Dec 2008 13:02] Bugs System
Pushed into 5.0.74  (revid:ramil@mysql.com-20081114074046-33ugvh6yzyviuk3e) (version source revid:ramil@mysql.com-20081114074046-33ugvh6yzyviuk3e) (pib:5)
[3 Dec 2008 20:23] Paul DuBois
Noted in 5.0.74 changelog.

mysqlcheck used SHOW FULL TABLES to get the list of tables in a
database. For some problems, such as an empty .frm file for a table,
this would fail and mysqlcheck then would neglect to check other
tables in the database.

Resetting report to NDI pending push in 5.1.x, 6.0.x.
[8 Dec 2008 10:22] Bugs System
Pushed into 5.1.31  (revid:ramil@mysql.com-20081114074046-33ugvh6yzyviuk3e) (version source revid:ramil@mysql.com-20081114094801-0jsu52xk59fb4n0g) (pib:5)
[8 Dec 2008 11:33] Bugs System
Pushed into 6.0.9-alpha  (revid:ramil@mysql.com-20081114074046-33ugvh6yzyviuk3e) (version source revid:ingo.struewing@sun.com-20081121151447-dtf2ofz2ys0zqed1) (pib:5)
[8 Dec 2008 17:02] Paul DuBois
Noted in 5.1.31, 6.0.9 changelogs.
[19 Jan 2009 11:25] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:03] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:09] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)