summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/include/wait_all_purged.inc
blob: 7dbb59a5d320ffb9530c33fa44f727f871e4a291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Wait for everything to be purged.
# The user should have set innodb_purge_rseg_truncate_frequency=1.

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')
    {
        let $wait_counter= 0;
    }
    if ($wait_counter)
    {
        real_sleep 0.1;
        dec $wait_counter;
    }
}
echo $remaining transactions not purged;