From 558f1eff64e7708b594ef0315e23bdeb1d23ccf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 4 Aug 2022 09:30:53 +0300 Subject: [PATCH] MDEV-29115 mariabackup.mdev-14447 started failing in a new way The test mariabackup.mdev-14447 is inserting relatively much data while concurrently backing up the data. The test often fails on CI systems, possibly due to an inherent race condition between the producer (server) and consumer (backup) that would be solved if the backup was being produced by the server (MDEV-14992). The written data volume was increased somewhat by commit 4179f93d28035ea2798cb1c16feeaaef87ab4775 (MDEV-18976). Let us trim the log volume by not writing PAGE_CHECKSUM records or row-level undo log records, and make the test cover what was intended to cover by creating the table in the system tablespace. --- mysql-test/suite/mariabackup/mdev-14447.result | 2 ++ mysql-test/suite/mariabackup/mdev-14447.test | 2 ++ storage/innobase/mtr/mtr0mtr.cc | 10 +++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/mariabackup/mdev-14447.result b/mysql-test/suite/mariabackup/mdev-14447.result index 8f7a1a8708b..16d3ab561f6 100644 --- a/mysql-test/suite/mariabackup/mdev-14447.result +++ b/mysql-test/suite/mariabackup/mdev-14447.result @@ -1,6 +1,8 @@ call mtr.add_suppression("InnoDB: New log files created"); +SET GLOBAL innodb_file_per_table=0; CREATE TABLE t(a varchar(40) PRIMARY KEY, b varchar(40), c varchar(40), d varchar(40), index(b,c,d)) ENGINE INNODB; # Create full backup , modify table, then create incremental/differential backup +SET debug_dbug='+d,skip_page_checksum',foreign_key_checks=0,unique_checks=0; BEGIN; INSERT INTO t select uuid(), uuid(), uuid(), uuid() from seq_1_to_100000; COMMIT; diff --git a/mysql-test/suite/mariabackup/mdev-14447.test b/mysql-test/suite/mariabackup/mdev-14447.test index b6998976e8c..79a0d075897 100644 --- a/mysql-test/suite/mariabackup/mdev-14447.test +++ b/mysql-test/suite/mariabackup/mdev-14447.test @@ -6,6 +6,7 @@ call mtr.add_suppression("InnoDB: New log files created"); let $basedir=$MYSQLTEST_VARDIR/tmp/backup; let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; +SET GLOBAL innodb_file_per_table=0; CREATE TABLE t(a varchar(40) PRIMARY KEY, b varchar(40), c varchar(40), d varchar(40), index(b,c,d)) ENGINE INNODB; echo # Create full backup , modify table, then create incremental/differential backup; @@ -13,6 +14,7 @@ echo # Create full backup , modify table, then create incremental/differential b exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log +SET debug_dbug='+d,skip_page_checksum',foreign_key_checks=0,unique_checks=0; BEGIN; INSERT INTO t select uuid(), uuid(), uuid(), uuid() from seq_1_to_100000; COMMIT; diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index 5718daeda0b..594982f07c2 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -1129,10 +1129,14 @@ std::pair mtr_t::do_write() ulint len = m_log.size(); ut_ad(len > 0); -#ifdef UNIV_DEBUG +#ifndef DBUG_OFF if (m_log_mode == MTR_LOG_ALL) { - m_memo.for_each_block(CIterate(*this)); - len = m_log.size(); + do { + DBUG_EXECUTE_IF("skip_page_checksum", continue;); + m_memo.for_each_block(CIterate + (*this)); + len = m_log.size(); + } while (0); } #endif