Bug #48756 Check table on Merge table should indicate precise report
Submitted: 13 Nov 2009 10:57 Modified: 13 Nov 2009 16:02
Reporter: selvam sivakumar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Merge storage engine Severity:S4 (Feature request)
Version:5.0.67, 5.1+ OS:Any
Assigned to: CPU Architecture:Any
Tags: check, corrupt, merge, table

[13 Nov 2009 10:57] selvam sivakumar
Description:
Corruption due to merge table itself rather than the underlying tables, can report which field in merge table caused the error.Now it simply says that merge table has been corrupted.

How to repeat:
1) Create two underlying tables.

use test;
create table t1(a int)engine=MyISAM;
create table t2(a int)engine=MyISAM;
create table total(a varchar(20))engine=MERGE union=(t1,t2);
check table total;

Indicates that error is in test.total, but it can say which field has produced error.

For eg:
  
   test.total.a is differently defined than the underlying tables or say the appropriate error in case of other failure.
                                                                                         

Suggested fix:
As explained,it can say the error precisely i.e which field is responsible
[13 Nov 2009 13:55] Valeriy Kravchuk
So, these messages:

mysql> check table total;
+------------+-------+----------+-----------------------------------------------
------------------------------------------------------+
| Table      | Op    | Msg_type | Msg_text
                                                      |
+------------+-------+----------+-----------------------------------------------
------------------------------------------------------+
| test.total | check | Error    | Table 'test.t1' is differently defined or of n
on-MyISAM type or doesn't exist                       |
| test.total | check | Error    | Unable to open underlying table which is diffe
rently defined or of non-MyISAM type or doesn't exist |
| test.total | check | error    | Corrupt
                                                      |
+------------+-------+----------+-----------------------------------------------
------------------------------------------------------+
3 rows in set (0.00 sec)

are not enough, and you'd like to get a name of the first column that is defined differenly? Please, confirm.
[13 Nov 2009 14:16] selvam sivakumar
Yes,i would like to get the name of field which caused the error to be listed.
[13 Nov 2009 16:02] Valeriy Kravchuk
Thank you for the clarification.