• unknown's avatar
    BUG#31024: STOP SLAVE does not stop attempted connect()s · 1836625f
    unknown authored
    Problem: if the IO slave thread is attempting to connect,
    STOP SLAVE waits for the attempt to finish. 
    It may take a long time.
    Fix: don't wait, stop the slave immediately.
    
    
    sql/slave.cc:
      Send a SIGALRM signal to the slave thread when stopping it (using
      pthread_kill()). This breaks current socket(), connect(), poll() etc.
      calls, and makes the subsequent thd->awake() call effective.
      
      Also, move the definition of KICK_SLAVE to slave.cc.
    sql/sql_repl.h:
      Removed KICK_SLAVE and inlined it in slave.cc because:
       - it was only called once, so better to make it local to where it is used
       - it needed to include a preprocessor conditional in the middle
    1836625f
slave.cc 174 KB