Skip to content

Commit fdb9e66

Browse files
committed
Implement a parameter for wait_all_purged.inc
1 parent e9f1d8d commit fdb9e66

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ SELECT * FROM t1;
124124

125125
DROP TABLE t1;
126126

127-
# Test adding virutal index on existing virtual column
127+
# Test adding index on existing virtual column
128128
CREATE TABLE t1 (a INT, b INT, c INT GENERATED ALWAYS AS(a+b));
129129

130130
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);
156156
COMMIT;
157157

158158
--echo # wait for purge to process the deleted/updated records.
159+
let $wait_all_purged=1;
159160
--source ../../innodb/include/wait_all_purged.inc
161+
let $wait_all_purged=0;
160162

161163
SET DEBUG_SYNC= 'now SIGNAL purged';
162164

mysql-test/suite/innodb/include/wait_all_purged.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# Wait for everything to be purged.
22
# The user should have set innodb_purge_rseg_truncate_frequency=1.
33

4+
if (!$wait_all_purged)
5+
{
6+
let $wait_all_purged= 0;
7+
}
8+
let $remaining_expect= `select concat('InnoDB ',$wait_all_purged)`;
9+
410
let $wait_counter= 300;
511
while ($wait_counter)
612
{
713
--replace_regex /.*History list length ([0-9]+).*/\1/
814
let $remaining= `SHOW ENGINE INNODB STATUS`;
9-
if ($remaining == 'InnoDB 0')
15+
if ($remaining == $remaining_expect)
1016
{
1117
let $wait_counter= 0;
1218
}

0 commit comments

Comments
 (0)