diff options
author | unknown <msvensson@neptunus.(none)> | 2006-05-23 16:20:03 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-05-23 16:20:03 +0200 |
commit | a6cc2de9f6dad07da112697f192828546bc706bd (patch) | |
tree | e884e907839411037f2e687a9e21fc7e78377d36 /sql/slave.cc | |
parent | a2fb5dc56a458a043cdc5e3b71e2b24731ecc06c (diff) | |
download | mariadb-git-a6cc2de9f6dad07da112697f192828546bc706bd.tar.gz |
Bug #19938 Valgrind error (race) in handle_slave_sql()
sql/slave.cc:
Read rli->events_till_abort to a temporary variable before unlocking the mutex
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index fa7ccc4427d..379d881f579 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -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(); |