BUG#29968 (rpl_ndb_circular.test and rpl_ndb_log.test fail):
Removing unguarded read of slave_running field from inside terminate_slave_threads(). This could cause premature exit in the event that the slave thread already were shutting down, but isn't finished yet. The fields slave_running, io_thd, and sql_thread are guarded by an associated run_lock. A read of these fields were not guarded inside terminate_slave_threads(), which caused an assertion to fire. The assertion was removed, and the code reorganized slightly. sql/slave.cc: Changing signature of terminate_slave_thread() to accept a skip_lock parameter instead of two mutexes. This mimics the signature of the terminate_slave_threads() function. Code is also changed as a result of this. Removing unguarded check of slave_running field in the master info and relay log info structure since that could cause premature exit of terminate_slave_threads(). The thread variable for each of the slave threads can change before acquiring the run_lock mutex inside terminate_slave_thread(). Hence an assertion was removed that read the variable without guarding it with run_lock. Code that checked *slave_running status inside terminate_slave_thread() was reorganized slightly. sql/slave.h: Moving terminate_slave_thread() to use internal linkage.
Showing
Please register or sign in to comment