Skip to content
Permalink
Browse files

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.
  • Loading branch information...
dr-m committed Aug 13, 2019
1 parent 20c78a6 commit eedd6179c1e5e8651270b353a693887179ad7bf3
Showing with 4 additions and 1 deletion.
  1. +2 −0 mysql-test/suite/innodb/r/trx_id_future.result
  2. +2 −1 mysql-test/suite/innodb/t/trx_id_future.test
@@ -2,8 +2,10 @@
# Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
# IN THE FUTURE
#
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
INSERT INTO t1 VALUES(1);
InnoDB 0 transactions not purged
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
call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
SELECT * FROM t1;
@@ -7,13 +7,14 @@
--source include/have_innodb.inc
--source include/not_embedded.inc

SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
let PAGE_SIZE=`select @@innodb_page_size`;

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

let MYSQLD_DATADIR=`select @@datadir`;

--source include/wait_all_purged.inc
--source include/shutdown_mysqld.inc

perl;

0 comments on commit eedd617

Please sign in to comment.
You can’t perform that action at this time.