Commit 571d4137 authored by Marko Mäkelä's avatar Marko Mäkelä

Add IMPORT test for MDEV-12123 Page contains nonzero PAGE_MAX_TRX_ID

parent d0ef1aaf
......@@ -953,8 +953,24 @@ INSERT INTO t32 VALUES(0), (0);
SELECT MAX(a) AS `Expect 6` FROM t32;
Expect 6
6
FLUSH TABLES t33 FOR EXPORT;
backup: t33
UNLOCK TABLES;
DROP TABLE t33;
CREATE TABLE t33 (
a BIGINT NOT NULL PRIMARY KEY,
b BIGINT NOT NULL AUTO_INCREMENT,
KEY(b)) ENGINE = InnoDB;
ALTER TABLE t33 DISCARD TABLESPACE;
restore: t33 .ibd and .cfg files
ALTER TABLE t33 IMPORT TABLESPACE;
INSERT INTO t33 VALUES(3, NULL);
SELECT MAX(b) AS `Expect 4` FROM t33;
Expect 4
4
SELECT * FROM t33;
a b
10 1
2 2
3 4
DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t30, t32, t33;
......@@ -520,7 +520,28 @@ SELECT MAX(a) AS `Expect 2` FROM t32;
INSERT INTO t32 VALUES(0), (0);
SELECT MAX(a) AS `Expect 6` FROM t32;
FLUSH TABLES t33 FOR EXPORT;
let MYSQLD_DATADIR=`select @@datadir`;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_backup_tablespaces("test", "t33");
EOF
UNLOCK TABLES;
DROP TABLE t33;
CREATE TABLE t33 (
a BIGINT NOT NULL PRIMARY KEY,
b BIGINT NOT NULL AUTO_INCREMENT,
KEY(b)) ENGINE = InnoDB;
ALTER TABLE t33 DISCARD TABLESPACE;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_discard_tablespaces("test", "t33");
ib_restore_tablespaces("test", "t33");
EOF
ALTER TABLE t33 IMPORT TABLESPACE;
INSERT INTO t33 VALUES(3, NULL);
SELECT MAX(b) AS `Expect 4` FROM t33;
SELECT * FROM t33;
DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t30, t32, t33;
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