summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-06-07 10:53:33 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-06-07 10:53:33 +0300
commit9e6fd2995b2276aa50b2433e475cfe46dfd2bc2c (patch)
treee4859025ee87ae4891a78a13b4197ee39d31e5c8
parent4b6f5aec55305c6424749e919c65165d3b8d9bb1 (diff)
downloadmariadb-git-9e6fd2995b2276aa50b2433e475cfe46dfd2bc2c.tar.gz
MDEV-25506 fixup: Wait for TRUNCATE recovery
-rw-r--r--mysql-test/suite/innodb/r/truncate_crash.result4
-rw-r--r--mysql-test/suite/innodb/t/truncate_crash.test6
2 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/truncate_crash.result b/mysql-test/suite/innodb/r/truncate_crash.result
index 0c20e76d331..ae3e6f6f4bf 100644
--- a/mysql-test/suite/innodb/r/truncate_crash.result
+++ b/mysql-test/suite/innodb/r/truncate_crash.result
@@ -8,6 +8,10 @@ connection default;
SET DEBUG_SYNC='now WAIT_FOR c';
# restart
disconnect wait;
+SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+InnoDB 0 transactions not purged
+SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SELECT COUNT(*) FROM t1;
COUNT(*)
0
diff --git a/mysql-test/suite/innodb/t/truncate_crash.test b/mysql-test/suite/innodb/t/truncate_crash.test
index 5cb39c745dc..27b8feea8a4 100644
--- a/mysql-test/suite/innodb/t/truncate_crash.test
+++ b/mysql-test/suite/innodb/t/truncate_crash.test
@@ -17,7 +17,13 @@ SET DEBUG_SYNC='now WAIT_FOR c';
--source include/restart_mysqld.inc
disconnect wait;
+SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+--source include/wait_all_purged.inc
+SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
+
--replace_result 2 0
SELECT COUNT(*) FROM t1;
TRUNCATE TABLE t1;
DROP TABLE t1;
+