summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fil0fil.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-08-14 11:09:06 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-08-14 16:25:18 +0300
commitbfb6ea02321f963c2b5f5beb333283585d3d1be3 (patch)
tree1de9aa594dbefd0ce33301ec00833b442e9658af /storage/innobase/include/fil0fil.h
parenta80753594a37538a35df7c02ae80da624578dec4 (diff)
downloadmariadb-git-bfb6ea02321f963c2b5f5beb333283585d3d1be3.tar.gz
MDEV-8589: Non-default ENCRYPTION_KEY_ID is ignored upon reading a table
Analysis: Problem was that when a new tablespace is created a default encryption info is also created and stored to the tablespace. Later a new encryption information was created with correct key_id but that does not affect on IV. Fix: Push encryption mode and key_id to lower levels and create correct encryption info when a new tablespace is created. This fix does not contain test case because, currently incorrect encryption key causes page corruption and a lot of error messages to error log causing mtr to fail.
Diffstat (limited to 'storage/innobase/include/fil0fil.h')
-rw-r--r--storage/innobase/include/fil0fil.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index a3785292115..93ff999bcfe 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -774,6 +774,9 @@ char*
fil_read_link_file(
/*===============*/
const char* name); /*!< in: tablespace name */
+
+#include "fil0crypt.h"
+
/*******************************************************************//**
Creates a new single-table tablespace to a database directory of MySQL.
Database directories are under the 'datadir' of MySQL. The datadir is the
@@ -792,9 +795,11 @@ fil_create_new_single_table_tablespace(
const char* dir_path, /*!< in: NULL or a dir path */
ulint flags, /*!< in: tablespace flags */
ulint flags2, /*!< in: table flags2 */
- ulint size) /*!< in: the initial size of the
+ ulint size, /*!< in: the initial size of the
tablespace file in pages,
must be >= FIL_IBD_FILE_INITIAL_SIZE */
+ fil_encryption_t mode, /*!< in: encryption mode */
+ ulint key_id) /*!< in: encryption key_id */
__attribute__((nonnull, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/********************************************************************//**