diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-18 10:23:49 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-18 10:23:49 +0200 |
commit | 4e0004ea13a9cf2883afe525b947dbefb18f32f3 (patch) | |
tree | c85f0cd2da53bdc37a4bea92ee517585aca20c8d /storage | |
parent | c36a2a0d1c03900796dc35c01a745bec8b1b54e2 (diff) | |
parent | a1974d1991f808146c11ca0ada3724e8bafd5fb8 (diff) | |
download | mariadb-git-4e0004ea13a9cf2883afe525b947dbefb18f32f3.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0crypt.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index 4aace91d51a..8102e1d6238 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -1530,12 +1530,19 @@ static bool fil_crypt_find_space_to_rotate( key_state->key_version != 0); bool wake = true; - while (state->space && !state->should_shutdown()) { + while (state->space) { if (state->space == fil_system.temp_space) { wake = false; goto done; } + if (state->should_shutdown()) { + state->space->release(); +done: + state->space = nullptr; + break; + } + mysql_mutex_unlock(&fil_crypt_threads_mutex); /* If there is no crypt data and we have not yet read page 0 for this tablespace, we need to read it before @@ -1558,12 +1565,6 @@ static bool fil_crypt_find_space_to_rotate( mysql_mutex_lock(&fil_crypt_threads_mutex); } - if (state->space) { - state->space->release(); -done: - state->space = NULL; - } - /* no work to do; release our allocation of I/O capacity */ fil_crypt_return_iops(state, wake); return true; |