summaryrefslogtreecommitdiff
path: root/storage/innobase/buf
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-05-27 15:37:13 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-05-27 16:52:36 +0300
commita25ccd4f83912e02091abe1cba8515266483559b (patch)
treea41d029c34eebb3f93349e526abf5631530f73ca /storage/innobase/buf
parent2bea4bd9ed7ebdee60a70918816c46d2cf3362b9 (diff)
downloadmariadb-git-a25ccd4f83912e02091abe1cba8515266483559b.tar.gz
MDEV-8238: Tables with encryption=yes using file_key_management plugin are not encrypted
Analysis: Problem was that encryption was skipped. Fixed by making sure that tables with ENCRYPTED=YES are encrypted.
Diffstat (limited to 'storage/innobase/buf')
-rw-r--r--storage/innobase/buf/buf0buf.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 7249dd7bb5b..ae73c3ce9c5 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -5728,7 +5728,8 @@ buf_page_encrypt_before_write(
return const_cast<byte*>(src_frame);
}
- if (fil_space_check_encryption_write(bpage->space) == false) {
+ /* Is encryption needed? */
+ if (crypt_data->type == CRYPT_SCHEME_UNENCRYPTED) {
/* An unencrypted table */
bpage->key_version = 0;
return const_cast<byte*>(src_frame);