summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fil0crypt.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-10 12:11:42 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-15 08:07:20 +0200
commit2af28a363c0ac55c9b91aa9eb26949fc9ecf043a (patch)
tree1ba18e1b428f92b168b0faefce90964a8a0c5380 /storage/innobase/include/fil0crypt.h
parent743ac7c2d0f7c27699d53f35137e02ee3cfd4b71 (diff)
downloadmariadb-git-2af28a363c0ac55c9b91aa9eb26949fc9ecf043a.tar.gz
MDEV-11782: Redefine the innodb_encrypt_log format
Write only one encryption key to the checkpoint page. Use 4 bytes of nonce. Encrypt more of each redo log block, only skipping the 4-byte field LOG_BLOCK_HDR_NO which the initialization vector is derived from. Issue notes, not warning messages for rewriting the redo log files. recv_recovery_from_checkpoint_finish(): Do not generate any redo log, because we must avoid that before rewriting the redo log files, or otherwise a crash during a redo log rewrite (removing or adding encryption) may end up making the database unrecoverable. Instead, do these tasks in innobase_start_or_create_for_mysql(). Issue a firm "Missing MLOG_CHECKPOINT" error message. Remove some unreachable code and duplicated error messages for log corruption. LOG_HEADER_FORMAT_ENCRYPTED: A flag for identifying an encrypted redo log format. log_group_t::is_encrypted(), log_t::is_encrypted(): Determine if the redo log is in encrypted format. recv_find_max_checkpoint(): Interpret LOG_HEADER_FORMAT_ENCRYPTED. srv_prepare_to_delete_redo_log_files(): Display NOTE messages about adding or removing encryption. Do not issue warnings for redo log resizing any more. innobase_start_or_create_for_mysql(): Rebuild the redo logs also when the encryption changes. innodb_log_checksums_func_update(): Always use the CRC-32C checksum if innodb_encrypt_log. If needed, issue a warning that innodb_encrypt_log implies innodb_log_checksums. log_group_write_buf(): Compute the checksum on the encrypted block contents, so that transmission errors or incomplete blocks can be detected without decrypting. Rewrite most of the redo log encryption code. Only remember one encryption key at a time (but remember up to 5 when upgrading from the MariaDB 10.1 format.)
Diffstat (limited to 'storage/innobase/include/fil0crypt.h')
-rw-r--r--storage/innobase/include/fil0crypt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h
index 72dd6c0d9c9..7185857c039 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -27,6 +27,7 @@ Created 04/01/2015 Jan Lindström
#define fil0crypt_h
#include "os0event.h"
+#include "my_crypt.h"
/**
* Magic pattern in start of crypt data on page 0