mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
MDEV-19747: Deprecate and ignore innodb_log_optimize_ddl
During native table rebuild or index creation, InnoDB used to skip redo logging and write MLOG_INDEX_LOAD records to inform crash recovery and Mariabackup of the gaps in redo log. This is fragile and prohibits some optimizations, such as skipping the doublewrite buffer for newly (re)initialized pages (MDEV-19738). row_merge_write_redo(): Remove. We do not write MLOG_INDEX_LOAD records any more. Instead, we write full redo log. FlushObserver: Remove. fseg_free_page_func(): Remove the parameter log. Redo logging cannot be disabled. fil_space_t::redo_skipped_count: Remove. We cannot remove buf_block_t::skip_flush_check, because PageBulk will temporarily generate invalid B-tree pages in the buffer pool.
This commit is contained in:
parent
8ccb3caafb
commit
fc2f2fa853
46 changed files with 127 additions and 964 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2013, 2019, MariaDB Corporation.
|
||||
Copyright (c) 2013, 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
|
||||
|
|
@ -494,7 +494,6 @@ fsp_reserve_free_extents(
|
|||
@param[in] offset page number
|
||||
@param[in] ahi whether we may need to drop the adaptive
|
||||
hash index
|
||||
@param[in] log whether to write MLOG_INIT_FREE_PAGE record
|
||||
@param[in,out] mtr mini-transaction */
|
||||
void
|
||||
fseg_free_page_func(
|
||||
|
|
@ -504,14 +503,13 @@ fseg_free_page_func(
|
|||
#ifdef BTR_CUR_HASH_ADAPT
|
||||
bool ahi,
|
||||
#endif /* BTR_CUR_HASH_ADAPT */
|
||||
bool log,
|
||||
mtr_t* mtr);
|
||||
#ifdef BTR_CUR_HASH_ADAPT
|
||||
# define fseg_free_page(header, space, offset, ahi, log, mtr) \
|
||||
fseg_free_page_func(header, space, offset, ahi, log, mtr)
|
||||
# define fseg_free_page(header, space, offset, ahi, mtr) \
|
||||
fseg_free_page_func(header, space, offset, ahi, mtr)
|
||||
#else /* BTR_CUR_HASH_ADAPT */
|
||||
# define fseg_free_page(header, space, offset, ahi, log, mtr) \
|
||||
fseg_free_page_func(header, space, offset, log, mtr)
|
||||
# define fseg_free_page(header, space, offset, ahi, mtr) \
|
||||
fseg_free_page_func(header, space, offset, mtr)
|
||||
#endif /* BTR_CUR_HASH_ADAPT */
|
||||
/** Determine whether a page is free.
|
||||
@param[in,out] space tablespace
|
||||
|
|
@ -636,9 +634,7 @@ inline void fsp_init_file_page(
|
|||
block->page.id.space(), block->page.id.page_no(),
|
||||
log_ptr, mtr);
|
||||
mlog_close(mtr, log_ptr);
|
||||
if (!innodb_log_optimize_ddl) {
|
||||
block->page.init_on_flush = true;
|
||||
}
|
||||
block->page.init_on_flush = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue