Bug #59421 reset srv_main_thread_op_info in srv_master_do_purge
Submitted: 11 Jan 2011 15:55 Modified: 12 Jan 2011 8:20
Reporter: Mark Callaghan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S4 (Feature request)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any
Tags: innodb, show, STATUS

[11 Jan 2011 15:55] Mark Callaghan
Description:
srv_main_thread_op_info is set to "master purging" prior to the call to srv_master_do_purge. It is quickly changed in srv_sync_log_buffer_in_background() and never reset to indicate a purge is in progress. The alternatives are:
1) reset it in srv_master_do_purge
2) have srv_sync_log_buffer_in_background save/restore old value

srv_master_do_purge(void)
/*=====================*/
{
        ulint   n_pages_purged;

        ut_ad(!mutex_own(&kernel_mutex));

        ut_a(srv_n_purge_threads == 0);

        do {
                srv_main_thread_op_info = "master purging";  <---- reset it here

How to repeat:
get a server to do lots of purge, check the main thread status in SHOW ENGINE INNODB STATUS, it will always be "flushing logs" which doesn't describe what is really being done

or read the source in srv0srv.c

Suggested fix:
described above