1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00
Files
mariadb/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
Yuchen Pei 7c91082e39 MDEV-27912 Fixing inconsistency w.r.t. expect files in tests.
mtr uses group suffix, but some existing inc and test files use
server_id for expect files. This patch aims to fix that.

For spider:

With this change we will not have to maintain a separate version of
restart_mysqld.inc for spider, that duplicates code, just because
spider tests use different names for expect files, and shutdown_mysqld
requires magical names for them.

With this change spider tests will also be able to use other features
provided by restart_mysqld.inc without code duplication, like the
parameter $restart_parameters (see e.g. the testcase mdev_29904.test
in commit ef1161e5d4f).

Tests run after this change: default, spider, rocksdb, galera, using
the following command

mtr --parallel=auto --force --max-test-fail=0 --skip-core-file
mtr --suite spider,spider/*,spider/*/* \
    --skip-test="spider/oracle.*|.*/t\..*" --parallel=auto --big-test \
    --force --max-test-fail=0 --skip-core-file
mtr --suite galera --parallel=auto
mtr --suite rocksdb --parallel=auto
2023-03-22 11:55:57 +11:00

77 lines
2.3 KiB
Plaintext

--source include/have_innodb.inc
--source include/have_debug.inc
--source include/big_test.inc
# Embedded server tests do not support restarting
--source include/not_embedded.inc
# We are crashing the server on purpose
--source include/not_valgrind.inc
--source include/not_crashrep.inc
# The test does work with any page size, but we want to reduce the
# test running time by limiting the combinations. The redo log format
# is independent of the page size.
--source include/have_innodb_16k.inc
let $restart_noprint=2;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;
CREATE DATABASE very_long_database_name;
USE very_long_database_name;
let $i=1300;
--disable_query_log
while ($i)
{
eval CREATE TABLE veryLongTableNameToCreateMLOG_FILE_NAMErecords$i (a SERIAL)
ENGINE=InnoDB;
dec $i;
}
--enable_query_log
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
--exec echo "wait" > $_expect_file_name
SET debug_dbug = '+d,increase_mtr_checkpoint_size';
SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013
set global innodb_log_checkpoint_now = 1;
--echo # Skip MLOG_FILE_NAME redo records during recovery
--source include/start_mysqld.inc
DROP DATABASE very_long_database_name;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;
--echo # Commit the multi-rec mini transaction if mtr size
--echo # exceeds LOG_CHECKPOINT_FREE_PER_THREAD size during checkpoint.
CREATE DATABASE very_long_database_name;
USE very_long_database_name;
let $i=1300;
--disable_query_log
while ($i)
{
eval CREATE TABLE veryLongTableNameToCreateMLOG_FILE_NAMErecords$i (a SERIAL)
ENGINE=InnoDB;
dec $i;
}
--enable_query_log
--exec echo "wait" > $_expect_file_name
SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013
set global innodb_log_checkpoint_now = 1;
--echo # Skip MLOG_FILE_NAME redo records during recovery
--let $restart_parameters = --debug-dbug=d,reduce_recv_parsing_buf
--source include/start_mysqld.inc
DROP DATABASE very_long_database_name;