diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/t/undo_truncate_recover.test | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/t/undo_truncate_recover.test')
-rw-r--r-- | mysql-test/suite/innodb/t/undo_truncate_recover.test | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.test b/mysql-test/suite/innodb/t/undo_truncate_recover.test new file mode 100644 index 00000000..148c3f93 --- /dev/null +++ b/mysql-test/suite/innodb/t/undo_truncate_recover.test @@ -0,0 +1,57 @@ +# +# WL#6965: Truncate UNDO logs. +# + +--source include/big_test.inc +--source include/not_valgrind.inc +# With larger innodb_page_size, the undo log tablespaces do not grow enough. +--source include/innodb_page_size_small.inc +--source include/have_innodb.inc +--source include/have_debug.inc +# Tests with embedded server do not support restarting +--source include/not_embedded.inc + +# Re-create the undo log tablespaces after slow shutdown +SET GLOBAL innodb_fast_shutdown=0; +let $restart_parameters="--innodb_undo_tablespaces=2"; +--source include/restart_mysqld.inc + +SET GLOBAL innodb_undo_log_truncate = 1; + +let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; + +create table t1(keyc int primary key, c char(100)) engine = innodb; +begin; +--disable_query_log +let $i=30000; +while ($i) { + eval insert into t1 values(30000-$i, ''); + dec $i; +} +--enable_query_log +commit; + +let $checksum_algorithm = `SELECT @@GLOBAL.innodb_checksum_algorithm`; +let SEARCH_PATTERN = ib_undo_trunc; +begin; +update t1 set c = 'MariaDB'; +update t1 set c = 'InnoDB'; +eval set global debug_dbug = '+d,$SEARCH_PATTERN'; +commit; +drop table t1; +call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces"); +SET GLOBAL innodb_fast_shutdown=0; +--source include/shutdown_mysqld.inc +--source include/search_pattern_in_file.inc +--let $restart_parameters= --innodb-undo-tablespaces=1 +--let $restart_noprint=1 +if ($checksum_algorithm == "strict_full_crc32") +{ + let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_crc32; +} + +if ($checksum_algorithm == "strict_crc32") +{ + let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_full_crc32; +} +--source include/start_mysqld.inc |