diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-12-29 01:59:05 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-12-29 01:59:05 +0100 |
commit | 54b61b8b44eb0ff5257bbac8b38578c4c5f2ed38 (patch) | |
tree | ea1d8b24986785aeaf30042b04ac0e32579d1f4a /sql/threadpool_unix.cc | |
parent | ecad00bc4e0a9f95f4db9dcff1745d793a91e4c3 (diff) | |
download | mariadb-git-54b61b8b44eb0ff5257bbac8b38578c4c5f2ed38.tar.gz |
LP9091416: destroy timer mutex when threadpool scheduler shuts down.
Fixes valgrind warning.
Diffstat (limited to 'sql/threadpool_unix.cc')
-rw-r--r-- | sql/threadpool_unix.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc index 6d0ab80ad78..d421870fcab 100644 --- a/sql/threadpool_unix.cc +++ b/sql/threadpool_unix.cc @@ -470,7 +470,10 @@ static void* timer_thread(void *param) mysql_mutex_lock(&timer->mutex); int err = mysql_cond_timedwait(&timer->cond, &timer->mutex, &ts); if (timer->shutdown) + { + mysql_mutex_unlock(&timer->mutex); break; + } if (err == ETIMEDOUT) { timer->current_microtime= microsecond_interval_timer(); @@ -488,6 +491,8 @@ static void* timer_thread(void *param) } mysql_mutex_unlock(&timer->mutex); } + + mysql_mutex_destroy(&timer->mutex); DBUG_POP(); my_thread_end(); return NULL; |