Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1895,8 +1895,8 @@ struct my_option xb_server_options[] =

{"innodb_log_buffer_size", OPT_INNODB_LOG_BUFFER_SIZE,
"Redo log buffer size in bytes.",
(G_PTR*) &log_sys.buf_size, (G_PTR*) &log_sys.buf_size, 0,
GET_UINT, REQUIRED_ARG, 2U << 20,
(G_PTR*) &log_sys.buf_size_requested, (G_PTR*) &log_sys.buf_size_requested,
0, GET_UINT, REQUIRED_ARG, 2U << 20,
2U << 20, log_sys.buf_size_max, 0, 4096, 0},
{"innodb_log_file_mmap", OPT_INNODB_LOG_FILE_SIZE,
"Whether ib_logfile0 should be memory-mapped",
Expand Down Expand Up @@ -2672,7 +2672,7 @@ static bool innodb_init()
}

recv_sys.lsn= log_sys.next_checkpoint_lsn=
log_sys.get_lsn() - SIZE_OF_FILE_CHECKPOINT;
log_get_lsn() - SIZE_OF_FILE_CHECKPOINT;
log_sys.set_latest_format(false); // not encrypted
log_hdr_init();
byte *b= &log_hdr_buf[log_t::START_OFFSET];
Expand Down
30 changes: 30 additions & 0 deletions mysql-test/suite/innodb/r/log_file_disabled.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log --innodb-undo-tablespaces=0 --innodb-log-file-disabled
SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log --innodb-undo-tablespaces=0
SET GLOBAL innodb_log_file_disabled=ON;
SET STATEMENT max_statement_time=1e-6 FOR
SET GLOBAL innodb_log_file_disabled=OFF;
SET GLOBAL innodb_log_file_disabled=OFF;
CREATE TABLE t(a SERIAL, b CHAR(255) NOT NULL DEFAULT '') ENGINE=InnoDB;
SET GLOBAL innodb_log_file_disabled=ON;
ALTER TABLE t ADD c2 CHAR FIRST;
INSERT INTO t(a) SELECT * from seq_1_to_10000;
SET STATEMENT max_statement_time=1e-6 FOR
SET GLOBAL innodb_log_file_disabled=OFF;
DROP TABLE t;
SET GLOBAL innodb_log_file_disabled=OFF;
SET GLOBAL innodb_log_file_disabled=ON,
innodb_log_file_size=@@innodb_log_file_size + 4096;
CREATE TABLE t ENGINE=InnoDB SELECT 1;
SET GLOBAL innodb_log_file_disabled=OFF,
innodb_log_file_size=@@innodb_log_file_size - 4096;
# restart: --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log --innodb-undo-tablespaces=0
SELECT * FROM t;
1
1
DROP TABLE t;
# restart
5 changes: 1 addition & 4 deletions mysql-test/suite/innodb/r/log_file_overwrite.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ INSERT INTO t1 SELECT seq, repeat('a', 4000) FROM seq_1_to_1800;
#
# restart: --innodb-force-recovery=6
SET GLOBAL innodb_log_checkpoint_now=1;
Warnings:
Warning 138 InnoDB doesn't force checkpoint when innodb-force-recovery=6.
# restart: --innodb-read-only=1
SET GLOBAL innodb_log_checkpoint_now=1;
Warnings:
Warning 138 InnoDB doesn't force checkpoint when innodb-read-only=1.
# restart
Comment on lines 13 to 17

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warnings seem useful. Should we remove them ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warnings are not being localized via errmsg-utf8.txt; they are always in English. I wanted to make innodb_log_checkpoint_now to be able to use the same interface once MDEV-36828 has been fixed. The changes related to innodb_log_checkpoint_now can surely be reverted.

SET GLOBAL innodb_log_checkpoint_now=1;
DROP TABLE t1;
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/r/log_file_size.result
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ connection default;
# restart: --innodb-log-group-home-dir=foo\;bar
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /syntax error in innodb_log_group_home_dir/ in mysqld.1.err
FOUND 1 /InnoDB: File foo.*bar/ib_logfile0 was not found/ in mysqld.1.err
# restart: --debug-dbug=d,innodb_log_abort_1
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
Expand Down
28 changes: 25 additions & 3 deletions mysql-test/suite/innodb/r/log_file_size_online.result
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,38 @@ SELECT COUNT(*),LENGTH(b) FROM t GROUP BY b;
COUNT(*) LENGTH(b)
9 0
19991 255
SELECT @@innodb_log_group_home_dir;
@@innodb_log_group_home_dir
./
ib_logfile0
SHOW VARIABLES LIKE 'innodb_log_file_size';
Variable_name Value
innodb_log_file_size 5242880
SET GLOBAL innodb_log_file_size=6291456;
SET GLOBAL innodb_log_file_disabled=ON;
SET GLOBAL innodb_log_group_home_dir='log';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment here to capture our discussion. Changing innodb_log_group_home_dir dynamically would cause the server restart to fail unless the configuration file is also changed by user. It could be an hindrance to usability making it virtually unusable unless the configuration change is temporarily done (and reverted back subsequently) for some testing purpose. It should be documented well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is right. I edited the description of MDEV-36301 to try to make this clearer.

SELECT @@innodb_log_group_home_dir;
@@innodb_log_group_home_dir
log
SET GLOBAL innodb_log_file_size=6291456,innodb_log_file_disabled=OFF,
innodb_log_group_home_dir='log/';
ib_logfile0
SHOW VARIABLES LIKE 'innodb_log_file_size';
Variable_name Value
innodb_log_file_size 6291456
SET GLOBAL innodb_log_file_size=5242880;
SELECT @@innodb_log_group_home_dir;
@@innodb_log_group_home_dir
log/
SET GLOBAL innodb_log_group_home_dir='log';
ib_logfile0
SELECT @@innodb_log_group_home_dir;
@@innodb_log_group_home_dir
log
SET GLOBAL innodb_log_file_size=5242880,innodb_log_group_home_dir=default;
SHOW VARIABLES LIKE 'innodb_log_file_size';
Variable_name Value
innodb_log_file_size 5242880
FOUND 1 /InnoDB: Resized log to 6\.000MiB/ in mysqld.1.err
SHOW VARIABLES LIKE 'innodb_group_home_dir';
Variable_name Value
ib_logfile0
FOUND 3 /InnoDB: Resized log to 6\.000MiB/ in mysqld.1.err
DROP TABLE t;
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/t/log_file_disabled.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--skip-innodb-undo-tablespaces

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to add a comment on why we need to disable undo tablespaces.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. The reason is that this test is bootstrapping a new InnoDB data directory, and it assumes that we have innodb_undo_tablespaces=0. I originally developed this test for the 10.11 branch where that is the default setting. I didn’t investigate how to make this work with the new default innodb_undo_tablespaces=3, because I thought that with fewer files it is simpler.

45 changes: 45 additions & 0 deletions mysql-test/suite/innodb/t/log_file_disabled.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--source include/have_innodb.inc
--source include/have_sequence.inc

let $bugdir= $MYSQLTEST_VARDIR/tmp/log;
--mkdir $bugdir
let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');

--let $ibp=--innodb-log-group-home-dir=$bugdir --innodb-data-home-dir=$bugdir
--let $ibp=$ibp --innodb-undo-tablespaces=0

--let $restart_parameters= $ibp --innodb-log-file-disabled
--source include/restart_mysqld.inc
eval $check_no_innodb;
--rmdir $bugdir
--mkdir $bugdir
--let $restart_parameters= $ibp
--source include/restart_mysqld.inc
SET GLOBAL innodb_log_file_disabled=ON;
SET STATEMENT max_statement_time=1e-6 FOR
SET GLOBAL innodb_log_file_disabled=OFF;
SET GLOBAL innodb_log_file_disabled=OFF;
CREATE TABLE t(a SERIAL, b CHAR(255) NOT NULL DEFAULT '') ENGINE=InnoDB;
SET GLOBAL innodb_log_file_disabled=ON;
ALTER TABLE t ADD c2 CHAR FIRST;
INSERT INTO t(a) SELECT * from seq_1_to_10000;
SET STATEMENT max_statement_time=1e-6 FOR
SET GLOBAL innodb_log_file_disabled=OFF;
DROP TABLE t;
Comment on lines +25 to +30

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can we crash the server, restart and do select count(*) ? The intent is to check that the data is recovered properly after innodb_log_file_disabled is set to OFF.
  2. We should also test the case of a crash when innodb_log_file_disabled is ON and on restart. I think there should be an error message and server should refuse normal startup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Sure, this is worth adding.
  2. At the start of the test, the eval $check_no_innodb that InnoDB will refuse to start if it had been shut down or killed while innodb_log_file_disabled=ON was in effect. It does not matter which one.

What we could add is a check that a startup with innodb_force_recovery=6 is possible. Executing that after a server kill would lead to nondeterministic results, that is, sometimes the database might appear OK, sometimes not. But hopefully it should not crash, no matter what. For example, the root page could be pointing to child pages that had not been written yet, or the sibling links between pages could be broken, if only some of the pages had been written from the buffer pool. This would be interesting and worthwhile to test.

SET GLOBAL innodb_log_file_disabled=OFF;

#--error ER_WRONG_VALUE_FOR_VAR
#SET GLOBAL innodb_log_file_disabled=ON,innodb_log_file_size=10485761;
SET GLOBAL innodb_log_file_disabled=ON,
innodb_log_file_size=@@innodb_log_file_size + 4096;
CREATE TABLE t ENGINE=InnoDB SELECT 1;
SET GLOBAL innodb_log_file_disabled=OFF,
innodb_log_file_size=@@innodb_log_file_size - 4096;
--source include/restart_mysqld.inc
SELECT * FROM t;
DROP TABLE t;
Comment on lines +40 to +42

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also specify and test the scenario of default and slow shutdown (innodb_fast_shutdown=0,1) when innodb_log_file_disabled=ON. Do we expect it to work ? In MySQL it works as all pages are flushed and no redo recovery is involved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work, and the test step is worth adding. Due to b07920b, InnoDB would only start up with innodb_force_recovery=6, which makes it read-only. We could check the consistency of the data with CHECK TABLE and SELECT and expect it to be correct after the server was shut down, as long as innodb_fast_shutdown=2 is not being used.

--let $restart_parameters=
--source include/restart_mysqld.inc
--rmdir $bugdir
2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/t/log_file_overwrite.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ SET GLOBAL innodb_log_checkpoint_now=1;
let $restart_parameters=;
--source include/restart_mysqld.inc

SET GLOBAL innodb_log_checkpoint_now=1;

DROP TABLE t1;
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/log_file_size.test
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ DELETE FROM t1 WHERE a=0;
--source include/start_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= syntax error in innodb_log_group_home_dir;
--let SEARCH_PATTERN= InnoDB: File foo.*bar/ib_logfile0 was not found
--source include/search_pattern_in_file.inc

--let $restart_parameters= --debug-dbug=d,innodb_log_abort_1
Expand Down
28 changes: 25 additions & 3 deletions mysql-test/suite/innodb/t/log_file_size_online.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
--source include/not_embedded.inc
--source include/no_valgrind_without_big.inc

#
Expand Down Expand Up @@ -76,13 +77,34 @@ reap;

SELECT * FROM t WHERE a<10;
SELECT COUNT(*),LENGTH(b) FROM t GROUP BY b;

SELECT @@innodb_log_group_home_dir;
let $datadir=`select @@datadir`;
--list_files $datadir ib_logfile*
--mkdir $datadir/log
SHOW VARIABLES LIKE 'innodb_log_file_size';
SET GLOBAL innodb_log_file_size=6291456;
SET GLOBAL innodb_log_file_disabled=ON;
--list_files $datadir ib_logfile*
--list_files $datadir/log ib_logfile*
SET GLOBAL innodb_log_group_home_dir='log';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if a concurrent mariabackup is copying the redo log files ? Are we synchronizing with backup locks. Let's define the behaviour and test.

This comment is relevant for both innodb_log_file_disabled and innodb_log_group_home_dir.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When mariadb-backup --backup is running concurrently with any change of log related parameters, it will continue to monitor the old ib_logfile0 that it opened when the backup was started. That file will stop to receive any updates as soon as the checkpoint completes and the ib_logfile101 is supposed to take over. So, mariadb-backup --backup will basically hang. This problem exists ever since 177345d was implemented. As far as I can tell, the problem could only be addressed by making the mariadbd process responsible for copying (or replicating) the log when a backup is running.

For SET GLOBAL innodb_log_file_disabled=ON, the trouble starts immediately: log_t::disable() will unlink the ib_logfile0 and redirect log_sys.writer to the dummy function. Any processes that are holding an open file handle to the old log file will be able to read it, but that file will cease to receive any updates.

SELECT @@innodb_log_group_home_dir;
--list_files $datadir/log ib_logfile*
SET GLOBAL innodb_log_file_size=6291456,innodb_log_file_disabled=OFF,
innodb_log_group_home_dir='log/';
--list_files $datadir/log ib_logfile*
SHOW VARIABLES LIKE 'innodb_log_file_size';
SET GLOBAL innodb_log_file_size=5242880;
SELECT @@innodb_log_group_home_dir;
--list_files $datadir ib_logfile*
SET GLOBAL innodb_log_group_home_dir='log';
--list_files $datadir/log ib_logfile*
SELECT @@innodb_log_group_home_dir;
--list_files $datadir ib_logfile*
SET GLOBAL innodb_log_file_size=5242880,innodb_log_group_home_dir=default;
SHOW VARIABLES LIKE 'innodb_log_file_size';
--list_files $datadir/log ib_logfile*
SHOW VARIABLES LIKE 'innodb_group_home_dir';
--list_files $datadir ib_logfile*
let SEARCH_PATTERN = InnoDB: Resized log to 6\\.000MiB;
--source include/search_pattern_in_file.inc
--rmdir $datadir/log

DROP TABLE t;
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ COUNT(@@GLOBAL.innodb_log_group_home_dir)
1 Expected
'#---------------------BS_STVARS_036_02----------------------#'
SET @@GLOBAL.innodb_log_group_home_dir=1;
ERROR HY000: Variable 'innodb_log_group_home_dir' is a read only variable
ERROR 42000: Incorrect argument type to variable 'innodb_log_group_home_dir'
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_log_group_home_dir);
COUNT(@@GLOBAL.innodb_log_group_home_dir)
1
1 Expected
SELECT @@GLOBAL.innodb_log_group_home_dir;
@@GLOBAL.innodb_log_group_home_dir
./
SET @@GLOBAL.innodb_log_group_home_dir=DEFAULT;
SELECT @@GLOBAL.innodb_log_group_home_dir;
@@GLOBAL.innodb_log_group_home_dir
./
'#---------------------BS_STVARS_036_03----------------------#'
SELECT @@GLOBAL.innodb_log_group_home_dir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
Expand Down
16 changes: 14 additions & 2 deletions mysql-test/suite/sys_vars/r/sysvars_innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,18 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_FILE_DISABLED
SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether the ib_logfile0 is disabled (and InnoDB is crash-unsafe)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_FILE_MMAP
SESSION_VALUE NULL
DEFAULT_VALUE ON
Expand Down Expand Up @@ -1001,14 +1013,14 @@ NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_SPIN_WAIT_DELAY
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Delay between log buffer spin lock polls (0 to use a blocking latch)
VARIABLE_COMMENT Deprecated parameter with no effect
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6000
NUMERIC_BLOCK_SIZE 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


################## mysql-test\t\innodb_log_group_home_dir_basic.test ##########
# #
# Variable Name: innodb_log_group_home_dir #
Expand All @@ -22,6 +21,7 @@
# #
###############################################################################

--source include/not_embedded.inc
--source include/have_innodb.inc

--echo '#---------------------BS_STVARS_036_01----------------------#'
Expand All @@ -37,13 +37,15 @@ SELECT COUNT(@@GLOBAL.innodb_log_group_home_dir);
# Check if Value can set #
####################################################################

--error ER_INCORRECT_GLOBAL_LOCAL_VAR
--error ER_WRONG_TYPE_FOR_VAR
SET @@GLOBAL.innodb_log_group_home_dir=1;
--echo Expected error 'Read only variable'

SELECT COUNT(@@GLOBAL.innodb_log_group_home_dir);
--echo 1 Expected

SELECT @@GLOBAL.innodb_log_group_home_dir;
SET @@GLOBAL.innodb_log_group_home_dir=DEFAULT;
SELECT @@GLOBAL.innodb_log_group_home_dir;



Expand Down
18 changes: 10 additions & 8 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -557,16 +557,18 @@ buf_page_is_checksum_valid_crc32(
}

#ifndef UNIV_INNOCHECKSUM
/** Checks whether the lsn present in the page is lesser than the
peek current lsn.
@param check_lsn lsn to check
/** Check whether a page is newer than the durable LSN.
@param check_lsn whether to check the LSN
@param read_buf page frame
@return whether the FIL_PAGE_LSN is invalid */
static bool buf_page_check_lsn(bool check_lsn, const byte *read_buf)
@return whether the FIL_PAGE_LSN is invalid (ahead of the durable LSN) */
static bool buf_page_check_lsn(bool check_lsn, const byte *read_buf) noexcept
{
if (!check_lsn)
return false;
lsn_t current_lsn= log_sys.get_lsn();
/* A page may not be read before it is written, and it may not be
written before the corresponding log has been durably written.
Hence, we refer to the current durable LSN here */
lsn_t current_lsn= log_sys.get_flushed_lsn(std::memory_order_relaxed);
if (UNIV_UNLIKELY(current_lsn == log_sys.FIRST_LSN) &&
srv_force_recovery == SRV_FORCE_NO_LOG_REDO)
return false;
Expand Down Expand Up @@ -2651,8 +2653,8 @@ buf_page_get_gen(
innodb_undo_tablespaces=127. */
ut_d(extern bool ibuf_upgrade_was_needed;)
ut_ad(mode == BUF_GET_RECOVER
? recv_recovery_is_on() || log_sys.get_lsn() < 120000
|| log_sys.get_lsn() == recv_sys.lsn + SIZE_OF_FILE_CHECKPOINT
? recv_recovery_is_on() || log_get_lsn() < 120000
|| log_get_lsn() == recv_sys.lsn + SIZE_OF_FILE_CHECKPOINT
|| ibuf_upgrade_was_needed
: !recv_recovery_is_on() || recv_sys.after_apply);
ut_ad(mtr->is_active());
Expand Down
5 changes: 4 additions & 1 deletion storage/innobase/buf/buf0dblwr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void buf_dblwr_t::recover() noexcept
ut_ad(log_sys.last_checkpoint_lsn);
if (!is_created())
return;
const lsn_t max_lsn{log_sys.get_lsn()};
const lsn_t max_lsn{log_sys.get_flushed_lsn(std::memory_order_relaxed)};
ut_ad(recv_sys.scanned_lsn == max_lsn);
ut_ad(recv_sys.scanned_lsn >= recv_sys.lsn);

Expand Down Expand Up @@ -785,6 +785,9 @@ void buf_dblwr_t::flush_buffered_writes_completed(const IORequest &request)
ut_ad(lsn);
ut_ad(lsn >= bpage->oldest_modification());
log_write_up_to(lsn, true);
ut_ad(!e.request.node->space->full_crc32() ||
!buf_page_is_corrupted(true, static_cast<const byte*>(frame),
e.request.node->space->flags));
e.request.node->space->io(e.request, bpage->physical_offset(), e_size,
frame, bpage);
}
Expand Down
Loading