summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-07-05 13:15:35 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-07-05 15:47:13 +0300
commitfdb9e66feea4ee3a8769bff74277f76e49734fc8 (patch)
tree74223025ac6a69c6110912ae1af69cb75fc65da6
parente9f1d8da57ba9329289c3448223cc86a13a5d918 (diff)
downloadmariadb-git-fdb9e66feea4ee3a8769bff74277f76e49734fc8.tar.gz
Implement a parameter for wait_all_purged.inc
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test4
-rw-r--r--mysql-test/suite/innodb/include/wait_all_purged.inc8
2 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
index ad733eee3a7..7feeee768ff 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -124,7 +124,7 @@ SELECT * FROM t1;
DROP TABLE t1;
-# Test adding virutal index on existing virtual column
+# Test adding index on existing virtual column
CREATE TABLE t1 (a INT, b INT, c INT GENERATED ALWAYS AS(a+b));
INSERT INTO t1(a, b) VALUES (1, 1), (2, 2), (3, 3), (4, 4);
@@ -156,7 +156,9 @@ INSERT INTO t1(a, b) VALUES (8, 8);
COMMIT;
--echo # wait for purge to process the deleted/updated records.
+let $wait_all_purged=1;
--source ../../innodb/include/wait_all_purged.inc
+let $wait_all_purged=0;
SET DEBUG_SYNC= 'now SIGNAL purged';
diff --git a/mysql-test/suite/innodb/include/wait_all_purged.inc b/mysql-test/suite/innodb/include/wait_all_purged.inc
index 7dbb59a5d32..c7a16888829 100644
--- a/mysql-test/suite/innodb/include/wait_all_purged.inc
+++ b/mysql-test/suite/innodb/include/wait_all_purged.inc
@@ -1,12 +1,18 @@
# Wait for everything to be purged.
# The user should have set innodb_purge_rseg_truncate_frequency=1.
+if (!$wait_all_purged)
+{
+ let $wait_all_purged= 0;
+}
+let $remaining_expect= `select concat('InnoDB ',$wait_all_purged)`;
+
let $wait_counter= 300;
while ($wait_counter)
{
--replace_regex /.*History list length ([0-9]+).*/\1/
let $remaining= `SHOW ENGINE INNODB STATUS`;
- if ($remaining == 'InnoDB 0')
+ if ($remaining == $remaining_expect)
{
let $wait_counter= 0;
}