summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/fil/fil0fil.cc4
-rw-r--r--storage/xtradb/fil/fil0fil.cc3
2 files changed, 5 insertions, 2 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index ac30f3c7a25..c9ecf3dab0b 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -2085,7 +2085,9 @@ fil_write_flushed_lsn(
/* If tablespace is not encrypted, stamp flush_lsn to
first page of all system tablespace datafiles to avoid
unnecessary error messages on possible downgrade. */
- if (!space->crypt_data || space->crypt_data->min_key_version == 0) {
+ if (!space->crypt_data
+ || !space->crypt_data->should_encrypt()) {
+
fil_node_t* node;
ulint sum_of_sizes = 0;
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index 00f2c44637e..9023b4446b5 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -2136,7 +2136,8 @@ fil_write_flushed_lsn(
/* If tablespace is not encrypted, stamp flush_lsn to
first page of all system tablespace datafiles to avoid
unnecessary error messages on possible downgrade. */
- if (!space->crypt_data || space->crypt_data->min_key_version == 0) {
+ if (!space->crypt_data
+ || !space->crypt_data->should_encrypt()) {
fil_node_t* node;
ulint sum_of_sizes = 0;