diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-03 20:02:11 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-03 20:02:11 +0300 |
commit | 3db94d2403c1f2791bddd43656d7b0d6320b453d (patch) | |
tree | bb7af2ccef3ba30e0c33104d4f03e51b32fc4f19 /storage/innobase/include | |
parent | bcc1359223c254e7649383c0993b6d27d5002c5d (diff) | |
download | mariadb-git-3db94d2403c1f2791bddd43656d7b0d6320b453d.tar.gz |
MDEV-19346: Remove dummy InnoDB log checkpoints
log_checkpoint(), log_make_checkpoint_at(): Remove the parameter
write_always. It seems that the primary purpose of this parameter
was to ensure in the function recv_reset_logs() that both checkpoint
header pages will be overwritten, when the function is called from
the never-enabled function recv_recovery_from_archive_start().
create_log_files(): Merge recv_reset_logs() to its only caller.
Debug instrumentation: Prefer to flush the redo log, instead of
triggering a redo log checkpoint.
page_header_set_field(): Disable a debug assertion that will
always fail due to MDEV-19344, now that we no longer initiate
a redo log checkpoint before an injected crash.
In recv_reset_logs() there used to be two calls to
log_make_checkpoint_at(). The apparent purpose of this was
to ensure that both InnoDB redo log checkpoint header pages
will be initialized or overwritten.
The second call was removed (without any explanation) in MySQL 5.6.3:
mysql/mysql-server@4ca37968da54ddc6b3b6628f41428ddba1c79bb8
In MySQL 5.6.8 WL#6494, starting with
mysql/mysql-server@00a0ba8ad92569fcf08212b3b8cf046dc8a0ce10
the function recv_reset_logs() was not only invoked during
InnoDB data file initialization, but also during a regular
startup when the redo log is being resized.
mysql/mysql-server@45e91679832219e2593c77185342f11f85232b58
in MySQL 5.7.2 removed the UNIV_LOG_ARCHIVE code, but still
did not remove the parameter write_always.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/log0log.h | 18 | ||||
-rw-r--r-- | storage/innobase/include/log0recv.h | 10 | ||||
-rw-r--r-- | storage/innobase/include/page0page.ic | 2 |
3 files changed, 6 insertions, 24 deletions
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index 745714e791b..817cf8e8a61 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -2,7 +2,7 @@ Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2009, Google Inc. -Copyright (c) 2017, 2018, MariaDB Corporation. +Copyright (c) 2017, 2019, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -208,23 +208,13 @@ blocks from the buffer pool: it only checks what is lsn of the oldest modification in the pool, and writes information about the lsn in log files. Use log_make_checkpoint_at() to flush also the pool. @param[in] sync whether to wait for the write to complete -@param[in] write_always force a write even if no log -has been generated since the latest checkpoint @return true if success, false if a checkpoint write was already running */ -bool -log_checkpoint( - bool sync, - bool write_always); +bool log_checkpoint(bool sync); /** Make a checkpoint at or after a specified LSN. @param[in] lsn the log sequence number, or LSN_MAX -for the latest LSN -@param[in] write_always force a write even if no log -has been generated since the latest checkpoint */ -void -log_make_checkpoint_at( - lsn_t lsn, - bool write_always); +for the latest LSN */ +void log_make_checkpoint_at(lsn_t lsn); /****************************************************************//** Makes a checkpoint at the latest lsn and writes it to first page of each diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index daa8e85fbf5..7526999a1e4 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -69,16 +69,6 @@ Initiates the rollback of active transactions. */ void recv_recovery_rollback_active(void); /*===============================*/ -/******************************************************//** -Resets the logs. The contents of log files will be lost! */ -void -recv_reset_logs( -/*============*/ - lsn_t lsn); /*!< in: reset to this lsn - rounded up to be divisible by - OS_FILE_LOG_BLOCK_SIZE, after - which we add - LOG_BLOCK_HDR_SIZE */ /** Clean up after recv_sys_init() */ void recv_sys_close(); diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index d6fded4f178..76d041347fb 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -173,7 +173,9 @@ page_header_set_field( { ut_ad(page); ut_ad(field <= PAGE_N_RECS); +#if 0 /* FIXME: MDEV-19344 hits this */ ut_ad(field != PAGE_N_RECS || val); +#endif ut_ad(field == PAGE_N_HEAP || val < srv_page_size); ut_ad(field != PAGE_N_HEAP || (val & 0x7fff) < srv_page_size); |