Skip to content

Commit

Permalink
Post-fix for MDEV-11688 fil_crypt_threads_end() tries to create threads
Browse files Browse the repository at this point in the history
fil_crypt_threads_cleanup(): Do nothing if nothing was initialized.
  • Loading branch information
dr-m committed Jan 3, 2017
1 parent fc77925 commit ba8198a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions storage/innobase/fil/fil0crypt.cc
Expand Up @@ -2477,6 +2477,9 @@ void
fil_crypt_threads_cleanup()
/*=======================*/
{
if (!fil_crypt_threads_inited) {
return;
}
os_event_free(fil_crypt_event);
os_event_free(fil_crypt_threads_event);
mutex_free(&fil_crypt_threads_mutex);
Expand Down
8 changes: 6 additions & 2 deletions storage/xtradb/fil/fil0crypt.cc
Expand Up @@ -2465,8 +2465,9 @@ void
fil_crypt_threads_end()
/*===================*/
{
/* stop threads */
fil_crypt_set_thread_cnt(0);
if (fil_crypt_threads_inited) {
fil_crypt_set_thread_cnt(0);
}
}

/*********************************************************************
Expand All @@ -2476,6 +2477,9 @@ void
fil_crypt_threads_cleanup()
/*=======================*/
{
if (!fil_crypt_threads_inited) {
return;
}
os_event_free(fil_crypt_event);
os_event_free(fil_crypt_threads_event);
mutex_free(&fil_crypt_threads_mutex);
Expand Down

0 comments on commit ba8198a

Please sign in to comment.