Skip to content

Commit eedd617

Browse files
committed
MDEV-20138 innodb.trx_id_future fails on 10.3+
Starting with MDEV-12288 in MariaDB Server 10.3, the transaction identifiers on records will be reset on purge. Because purge might or might not run to completion before shutdown, it could happen that the bogus transaction identifier that our test is writing will be reset by purge after restart, and the expected warning message on SELECT will fail to appear. We resolve the race condition by ensuring that purge runs to completion before the shutdown.
1 parent 20c78a6 commit eedd617

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mysql-test/suite/innodb/r/trx_id_future.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
33
# IN THE FUTURE
44
#
5+
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
56
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
67
INSERT INTO t1 VALUES(1);
8+
InnoDB 0 transactions not purged
79
NOT FOUND /\[Warning\] InnoDB: A transaction id in a record of table `test`\.`t1` is newer than the system-wide maximum/ in mysqld.1.err
810
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
911
SELECT * FROM t1;

mysql-test/suite/innodb/t/trx_id_future.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
--source include/have_innodb.inc
88
--source include/not_embedded.inc
99

10+
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
1011
let PAGE_SIZE=`select @@innodb_page_size`;
1112

1213
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
1314
INSERT INTO t1 VALUES(1);
1415

1516
let MYSQLD_DATADIR=`select @@datadir`;
16-
17+
--source include/wait_all_purged.inc
1718
--source include/shutdown_mysqld.inc
1819

1920
perl;

0 commit comments

Comments
 (0)