• unknown's avatar
    Bug #34305 show slave status handling segfaults when slave io is about · 89e828b4
    unknown authored
        to leave
    
    The artifact was caused by
    a flaw in concurrent accessing the slave's io thd by
    the io itself and a handling show slave status thread.
    Namely, show_master_info did not acquire mi->run_lock mutex that is
    specified for mi->io_thd member.
    
    Fixed with deploying the mutex locking and unlocking. The mutex is kept
    short time and without interleaving with mi->data_lock mutex.
    
    Todo: to report and fix an issue with 
        sys_var_slave_skip_counter::{methods} 
    seem to acquire incorrectly
         active_mi->rli.run_lock
    instead of the specified
         active_mi->rli.data_lock
    
    A test case is difficult to compose, so rpl_packet should continue serving
    as the indicator.
    
    
    sql/slave.cc:
      implementing a TODO left at 4.1 time:
      mending access to mi->io_thd with the specified mutex;
    sql/slave.h:
      adding a member name to the list of that run_lock guards.
    89e828b4
slave.h 21.5 KB