Bug #19938 Valgrind error (race) in handle_slave_sql()
This commit is contained in:
parent
ebedae2cb3
commit
6fb8f4f878
@ -3949,10 +3949,17 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
|
||||
delete thd;
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
pthread_cond_broadcast(&rli->stop_cond);
|
||||
|
||||
/*
|
||||
Bug #19938 Valgrind error (race) in handle_slave_sql()
|
||||
Read the value of rli->event_till_abort before releasing the mutex
|
||||
*/
|
||||
const int eta= rli->events_till_abort;
|
||||
|
||||
// tell the world we are done
|
||||
pthread_mutex_unlock(&rli->run_lock);
|
||||
#ifndef DBUG_OFF // TODO: reconsider the code below
|
||||
if (abort_slave_event_count && !rli->events_till_abort)
|
||||
if (abort_slave_event_count && !eta)
|
||||
goto slave_begin;
|
||||
#endif
|
||||
my_thread_end();
|
||||
|
Loading…
x
Reference in New Issue
Block a user