Commit eedd6179 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 20c78a6d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment