Bug #84757 information_schema.tables doesn't report corrupted tables when columns are spec
Submitted: 31 Jan 2017 21:05 Modified: 2 Mar 2017 19:40
Reporter: Tim Yan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.5.43-enterprise-commercial-advanced OS:CentOS (6.5)
Assigned to: CPU Architecture:Any

[31 Jan 2017 21:05] Tim Yan
Description:
If columns are specified, information_schema.tables doesn't report corrupted tables:

mysql> select * from information_schema.tables where table_name ='messages';
+---------------+--------------+------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+----------------------------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | ENGINE | VERSION | ROW_FORMAT | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | MAX_DATA_LENGTH | INDEX_LENGTH | DATA_FREE | AUTO_INCREMENT | CREATE_TIME | UPDATE_TIME | CHECK_TIME | TABLE_COLLATION | CHECKSUM | CREATE_OPTIONS | TABLE_COMMENT                    |
+---------------+--------------+------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+----------------------------------+
| def           | fssdata4     | messages   | BASE TABLE | NULL   |    NULL | NULL       |       NULL |           NULL |        NULL |            NULL |         NULL |      NULL |           NULL | NULL        | NULL        | NULL       | NULL            |     NULL | NULL           | Incorrect file format 'messages' |
+---------------+--------------+------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+----------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> select table_name, engine, table_comment from information_schema.tables where table_name ='messages';
+------------+--------+---------------+
| table_name | engine | table_comment |
+------------+--------+---------------+
| messages   | MyISAM |               |
+------------+--------+---------------+
1 row in set (0.00 sec)

How to repeat:
1) Find a corrupted table
2) select * from information_schema where table_name='table_name';
3) select table_name, engine, table_comment from information_schema where table_name='table_name';

the 2) query reports the corruption but not 3) query.
[2 Feb 2017 19:40] Miguel Solorzano
Thank you for the bug report. Please provide small corrupted MyISAM table zipped using the Files tab. On my side with most recent source both cases not report corrupted table:

mysql 5.5 > select * from x.c;
ERROR 1194 (HY000): Table 'c' is marked as crashed and should be repaired
mysql 5.5 > select * from information_schema.tables where table_name ='c'\G
*************************** 1. row ***************************
  TABLE_CATALOG: def
   TABLE_SCHEMA: x
     TABLE_NAME: c
     TABLE_TYPE: BASE TABLE
         ENGINE: MyISAM
        VERSION: 10
     ROW_FORMAT: Dynamic
     TABLE_ROWS: 4
 AVG_ROW_LENGTH: 20
    DATA_LENGTH: 80
MAX_DATA_LENGTH: 281474976710655
   INDEX_LENGTH: 2048
      DATA_FREE: 0
 AUTO_INCREMENT: 5
    CREATE_TIME: 2017-02-02 17:23:52
    UPDATE_TIME: 2017-02-02 17:29:31
     CHECK_TIME: NULL
TABLE_COLLATION: utf8_general_ci
       CHECKSUM: NULL
 CREATE_OPTIONS: 
  TABLE_COMMENT: 
1 row in set (0,00 sec)

mysql 5.5 > select table_name, engine, table_comment  from information_schema.tables where table_name ='c'\G
*************************** 1. row ***************************
   table_name: c
       engine: MyISAM
table_comment: 
1 row in set (0,00 sec)

mysql 5.5 > show variables like "%version%";
+-------------------------+---------------------------------------+
| Variable_name           | Value                                 |
+-------------------------+---------------------------------------+
| innodb_version          | 5.5.55                                |
| protocol_version        | 10                                    |
| slave_type_conversions  |                                       |
| version                 | 5.5.55                                |
| version_comment         | Source distribution PULL: 2017-FEB-01 |
| version_compile_machine | x86_64                                |
| version_compile_os      | Linux                                 |
+-------------------------+---------------------------------------+
7 rows in set (0,00 sec)
[3 Mar 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".