Skip to content

Commit a758479

Browse files
committed
Post-fix for MDEV-11688 fil_crypt_threads_end() tries to create threads
fil_crypt_threads_cleanup(): Do nothing if nothing was initialized.
1 parent a0d396f commit a758479

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

storage/innobase/fil/fil0crypt.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,9 @@ void
23972397
fil_crypt_threads_cleanup()
23982398
/*=======================*/
23992399
{
2400+
if (!fil_crypt_threads_inited) {
2401+
return;
2402+
}
24002403
os_event_destroy(fil_crypt_event);
24012404
os_event_destroy(fil_crypt_threads_event);
24022405
mutex_free(&fil_crypt_threads_mutex);

storage/xtradb/fil/fil0crypt.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,8 +2465,9 @@ void
24652465
fil_crypt_threads_end()
24662466
/*===================*/
24672467
{
2468-
/* stop threads */
2469-
fil_crypt_set_thread_cnt(0);
2468+
if (fil_crypt_threads_inited) {
2469+
fil_crypt_set_thread_cnt(0);
2470+
}
24702471
}
24712472

24722473
/*********************************************************************
@@ -2476,6 +2477,9 @@ void
24762477
fil_crypt_threads_cleanup()
24772478
/*=======================*/
24782479
{
2480+
if (!fil_crypt_threads_inited) {
2481+
return;
2482+
}
24792483
os_event_free(fil_crypt_event);
24802484
os_event_free(fil_crypt_threads_event);
24812485
mutex_free(&fil_crypt_threads_mutex);

0 commit comments

Comments
 (0)