• Luis Soares's avatar
    BUG#44270: RESET SLAVE does not reset Last_IO_Error or Last_IO_Errno · 63fe4fe5
    Luis Soares authored
    The server was not cleaning the last IO error and error number when
    resetting slave.
    
    This patch addresses this issue by backporting into 5.1 part of the
    patch in BUG 34654. A fix for this issue had already been pushed into
    6.0 as part of the aforementioned bug, however the patch also included
    some refactoring. The fix for 5.1 does not take into account the
    refactoring part.
    
    mysql-test/extra/rpl_tests/rpl_reset_slave.test:
      Backported the test case and improved with deploying include/start_slave.inc
      in relevant spots.
    sql/slave.cc:
      Backported part of patch from 6.0 that includes cleaning 
      mi->clear_error() at:
        1. beginning of handle_slave_io
        2. on successful connection
      
      Also, backported the assertion added in the original patch.
    sql/sql_repl.cc:
      Backported the call to mi->clear_error() on reset_slave().
    63fe4fe5
rpl_stm_reset_slave.result 4.03 KB