WL#3951: MyISAM: Additional Error Logs for Data Corruption

Affects: Server-5.5   —   Status: Complete

When data corruption occurs, it is needed to log more information that can be 
used to locate the cause of corruption.

The following information is from BUG#28414:

When a myisam table becomes corrupted, mysql usually writes something like this 
to error log:

070514  9:43:48 [ERROR] mysqld-debug: Incorrect key file for 
table '.\test\t1.MYI'; try to repair it

However, this is not enough information to identify the source of these 
corruptions.

Some errors where we need the information are: 134, 127, 124, 126

Some ideas that could appear in error logs:

1) current running query which caused/found the corruption
2) current threads reading/writing from that table can be printed
3) the function/source code file in which the error originate can be printed.
4) dump the current processlist?
5) ... other ideas?

These information should be included in the release version of mysql.

A complete solution could be a combination of error logs and utilities for 
analyzing the corrupted file(s).