summaryrefslogtreecommitdiff
path: root/storage/innobase/include/log0crypt.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-07 12:01:20 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-07 14:31:36 +0200
commit70f0dbe4d30eb7932637fd0d085a2a22744000d1 (patch)
tree36cfaf122b16ab397a22e83a2869a0fd2986d56a /storage/innobase/include/log0crypt.h
parent522fbfcb5cf655851ce4ee4deaccfe430942f6ce (diff)
downloadmariadb-git-70f0dbe4d30eb7932637fd0d085a2a22744000d1.tar.gz
Cleanup: log upgrade and encryption
log_crypt_101_read_checkpoint(), log_crypt_101_read_block(): Declare as ATTRIBUTE_COLD. These are only used when checking that a MariaDB 10.1 encrypted redo log is clean. log_block_calc_checksum_format_0(): Define in the only compilation unit where it is needed. This is only used when reading the checkpoint information from redo logs before MariaDB 10.2.2. crypt_info_t: Declare the byte arrays directly with alignas(). log_crypt(): Use memcpy_aligned instead of reinterpret_cast on integers.
Diffstat (limited to 'storage/innobase/include/log0crypt.h')
-rw-r--r--storage/innobase/include/log0crypt.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/storage/innobase/include/log0crypt.h b/storage/innobase/include/log0crypt.h
index 2095649f131..980a79d8f9e 100644
--- a/storage/innobase/include/log0crypt.h
+++ b/storage/innobase/include/log0crypt.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (C) 2014, 2018, MariaDB Corporation.
+Copyright (C) 2014, 2020, 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
@@ -55,22 +55,18 @@ log_crypt_write_checkpoint_buf(
/** Read the MariaDB 10.1 checkpoint crypto (version, msg and iv) info.
@param[in] buf checkpoint buffer
@return whether the operation was successful */
-UNIV_INTERN
-bool
-log_crypt_101_read_checkpoint(const byte* buf);
+ATTRIBUTE_COLD bool log_crypt_101_read_checkpoint(const byte* buf);
/** Decrypt a MariaDB 10.1 redo log block.
@param[in,out] buf log block
@param[in] start_lsn server start LSN
@return whether the decryption was successful */
-bool log_crypt_101_read_block(byte* buf, lsn_t start_lsn);
+ATTRIBUTE_COLD bool log_crypt_101_read_block(byte* buf, lsn_t start_lsn);
/** Read the checkpoint crypto (version, msg and iv) info.
@param[in] buf checkpoint buffer
@return whether the operation was successful */
-UNIV_INTERN
-bool
-log_crypt_read_checkpoint_buf(const byte* buf);
+bool log_crypt_read_checkpoint_buf(const byte* buf);
/** log_crypt() operation code */
enum log_crypt_t {