summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fil0crypt.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-02-17 12:32:07 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2016-02-17 12:32:07 +0200
commit36ca65b73bcd0152680c88e09558bbe1237577ee (patch)
tree9d078fa9e448929d2b590d89c9eb31fe24943dfc /storage/innobase/include/fil0crypt.h
parent1ac64b7510fd006268936e46442f46a28250c249 (diff)
downloadmariadb-git-36ca65b73bcd0152680c88e09558bbe1237577ee.tar.gz
MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table
There was two problems. Firstly, if page in ibuf is encrypted but decrypt failed we should not allow InnoDB to start because this means that system tablespace is encrypted and not usable. Secondly, if page decrypt is detected we should return false from buf_page_decrypt_after_read.
Diffstat (limited to 'storage/innobase/include/fil0crypt.h')
-rw-r--r--storage/innobase/include/fil0crypt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h
index cf2e022c006..aa601f28e25 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (c) 2015, MariaDB Corporation.
+Copyright (c) 2015, 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -212,6 +212,7 @@ bool
fil_space_check_encryption_read(
/*============================*/
ulint space); /*!< in: tablespace id */
+
/******************************************************************
Decrypt a page
@return true if page is decrypted, false if not. */
@@ -226,7 +227,6 @@ fil_space_decrypt(
dberr_t* err); /*!< in: out: DB_SUCCESS or
error code */
-
/*********************************************************************
Encrypt buffer page
@return encrypted page, or original not encrypted page if encrypt
@@ -253,7 +253,8 @@ fil_space_decrypt(
ulint space, /*!< in: tablespace id */
byte* src_frame, /*!< in: page frame */
ulint page_size, /*!< in: size of data to encrypt */
- byte* dst_frame); /*!< in: where to decrypt to */
+ byte* dst_frame) /*!< in: where to decrypt to */
+ __attribute__((warn_unused_result));
/*********************************************************************
fil_space_verify_crypt_checksum