summaryrefslogtreecommitdiff
path: root/storage/innobase/include/log0log.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-05-22 10:31:44 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-05-23 10:25:11 +0300
commit47cede646b8f24b8dddc5bbb19b8e2b250858214 (patch)
tree0bae598f245099da7c4fa12c53deefb741cfbe1a /storage/innobase/include/log0log.h
parent3eef9f213fb289b6d6bde5c18d61520803bd54a9 (diff)
downloadmariadb-git-47cede646b8f24b8dddc5bbb19b8e2b250858214.tar.gz
MDEV-19543 Deprecate and ignore innodb_log_checksums
The parameter innodb_log_checksums that was introduced in MariaDB 10.2.2 via mysql/mysql-server@af0acedd885eb7103e319f79d25fda7386ef1506 does not make much sense. The original motivation of introducing this parameter (initially called innodb_log_checksum_algorithm in mysql/mysql-server@22ba38218e1d76c24f69b5a5595ad3bf5933acb0) was that the InnoDB redo log used the slow and insecure innodb algorithm. With hardware or SIMD accelerated CRC-32C, there should be no reason to allow checksums to be disabled on the redo log. The parameter innodb_encrypt_log already implies innodb_log_checksums=ON. Let us deprecate the parameter innodb_log_checksums and always compute redo log checksums, even if innodb_log_checksums=OFF is specified. An upgrade from MariaDB 10.2.2 or later will only be possible after using the default value innodb_log_checksums=ON. If the non-default value innodb_log_checksums=OFF was in effect when the server was shut down, a log block checksum mismatch will be reported and the upgraded server will fail to start up.
Diffstat (limited to 'storage/innobase/include/log0log.h')
-rw-r--r--storage/innobase/include/log0log.h29
1 files changed, 2 insertions, 27 deletions
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
index 2fb026849c1..4e51887bd5e 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -54,10 +54,6 @@ step which modifies the database, is started */
typedef ulint (*log_checksum_func_t)(const byte* log_block);
-/** Pointer to the log checksum calculation function. Protected with
-log_sys.mutex. */
-extern log_checksum_func_t log_checksum_algorithm_ptr;
-
/** Append a string to the log.
@param[in] str string
@param[in] len string length
@@ -261,28 +257,10 @@ log_block_set_data_len(
/*===================*/
byte* log_block, /*!< in/out: log block */
ulint len); /*!< in: data length */
-/************************************************************//**
-Calculates the checksum for a log block.
-@return checksum */
-UNIV_INLINE
-ulint
-log_block_calc_checksum(
-/*====================*/
- const byte* block); /*!< in: log block */
-
-/** Calculates the checksum for a log block using the CRC32 algorithm.
+/** Calculate the CRC-32C checksum of a log block.
@param[in] block log block
@return checksum */
-UNIV_INLINE
-ulint
-log_block_calc_checksum_crc32(
- const byte* block);
-
-/** Calculates the checksum for a log block using the "no-op" algorithm.
-@return the calculated checksum value */
-UNIV_INLINE
-ulint
-log_block_calc_checksum_none(const byte*);
+inline ulint log_block_calc_checksum_crc32(const byte* block);
/************************************************************//**
Gets a log block checksum field value.
@@ -360,9 +338,6 @@ void
log_refresh_stats(void);
/*===================*/
-/** Whether to generate and require checksums on the redo log pages */
-extern my_bool innodb_log_checksums;
-
/* Values used as flags */
#define LOG_FLUSH 7652559
#define LOG_CHECKPOINT 78656949