summaryrefslogtreecommitdiff
path: root/storage/innobase/fil/fil0crypt.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-02-16 14:56:59 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-02-16 14:56:59 +0100
commite0072fadcb00edae74e748aee3148075b9cddae2 (patch)
tree625d5c0869cfbb322a2b4cdaab453e17fd5d31bf /storage/innobase/fil/fil0crypt.cc
parent1146e98b3af3e2b15df0598a860f4571663a98d0 (diff)
parentae7989ca2059869f81c837509e5ff554f7f63562 (diff)
downloadmariadb-git-10.6-halfmerge.tar.gz
Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmerge
Diffstat (limited to 'storage/innobase/fil/fil0crypt.cc')
-rw-r--r--storage/innobase/fil/fil0crypt.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 4ca5acee3de..bca3945dcf6 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -995,10 +995,13 @@ fil_crypt_read_crypt_data(fil_space_t* space)
const ulint zip_size = space->zip_size();
mtr_t mtr;
mtr.start();
- if (buf_block_t* block = buf_page_get(page_id_t(space->id, 0),
- zip_size, RW_S_LATCH, &mtr)) {
+ if (buf_block_t* block = buf_page_get_gen(page_id_t(space->id, 0),
+ zip_size, RW_S_LATCH,
+ nullptr,
+ BUF_GET_POSSIBLY_FREED,
+ &mtr)) {
mysql_mutex_lock(&fil_system.mutex);
- if (!space->crypt_data) {
+ if (!space->crypt_data && !space->is_stopping()) {
space->crypt_data = fil_space_read_crypt_data(
zip_size, block->frame);
}