summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fil0crypt.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-05-20 13:35:51 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-05-20 14:10:07 +0300
commit3e55ef26d49a900782d2c2bb2c03470faed6ec9d (patch)
tree44593b2887b1e509a68d33bd526e0e3e154ad758 /storage/innobase/include/fil0crypt.h
parent44cd6f22d4fdf7df8da6bb00caf6493f715854bc (diff)
downloadmariadb-git-3e55ef26d49a900782d2c2bb2c03470faed6ec9d.tar.gz
MDEV-8173: InnoDB; Failing assertion: crypt_data->type == 1
Make sure that when we publish the crypt_data we access the memory cache of the tablespace crypt_data. Make sure that crypt_data is stored whenever it is really needed. All this is not yet enough in my opinion because: sql/encryption.cc has DBUG_ASSERT(scheme->type == 1) i.e. crypt_data->type == CRYPT_SCHEME_1 However, for InnoDB point of view we have global crypt_data for every tablespace. When we change variables on crypt_data we take mutex. However, when we use crypt_data for encryption/decryption we use pointer to this global structure and no mutex to protect against changes on crypt_data. Tablespace encryption starts in fil_crypt_start_encrypting_space from crypt_data that has crypt_data->type = CRYPT_SCHEME_UNENCRYPTED and later we write page 0 CRYPT_SCHEME_1 and finally whe publish that to memory cache.
Diffstat (limited to 'storage/innobase/include/fil0crypt.h')
-rw-r--r--storage/innobase/include/fil0crypt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h
index ccb2d852572..b633d1100bc 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -134,7 +134,7 @@ fil_space_get_crypt_data(
/*********************************************************************
Set crypt data for a space*/
UNIV_INTERN
-void
+fil_space_crypt_t*
fil_space_set_crypt_data(
/*=====================*/
ulint space, /*!< in: tablespace id */