mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-20389: Refine the test case
Let us invoke wait_all_purged.inc right before the workload. Starting with MDEV-12288 in MariaDB Server 10.3, also INSERT generates purge workload. If we do not ensure that purge has run to completion, the results on 10.3 and later could be nondeterministic.
This commit is contained in:
parent
2850b8d844
commit
4438ff07cd
2 changed files with 3 additions and 2 deletions
|
@ -6,7 +6,6 @@
|
||||||
#
|
#
|
||||||
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||||
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
|
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
|
||||||
InnoDB 0 transactions not purged
|
|
||||||
CREATE PROCEDURE insert_n(start int, end int)
|
CREATE PROCEDURE insert_n(start int, end int)
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE i INT DEFAULT start;
|
DECLARE i INT DEFAULT start;
|
||||||
|
@ -52,6 +51,7 @@ connection default;
|
||||||
# Connect to default and record how many pages were accessed
|
# Connect to default and record how many pages were accessed
|
||||||
# when selecting the record using the secondary key.
|
# when selecting the record using the secondary key.
|
||||||
#
|
#
|
||||||
|
InnoDB 3 transactions not purged
|
||||||
SET @num_pages_1 = num_pages_get();
|
SET @num_pages_1 = num_pages_get();
|
||||||
SELECT * FROM t1 force index (b);
|
SELECT * FROM t1 force index (b);
|
||||||
a b c
|
a b c
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
|
||||||
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
|
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
|
||||||
--source include/wait_all_purged.inc
|
|
||||||
|
|
||||||
DELIMITER ~~;
|
DELIMITER ~~;
|
||||||
CREATE PROCEDURE insert_n(start int, end int)
|
CREATE PROCEDURE insert_n(start int, end int)
|
||||||
|
@ -65,6 +64,8 @@ connection default;
|
||||||
--echo # Connect to default and record how many pages were accessed
|
--echo # Connect to default and record how many pages were accessed
|
||||||
--echo # when selecting the record using the secondary key.
|
--echo # when selecting the record using the secondary key.
|
||||||
--echo #
|
--echo #
|
||||||
|
--let $wait_all_purged=3
|
||||||
|
--source include/wait_all_purged.inc
|
||||||
SET @num_pages_1 = num_pages_get();
|
SET @num_pages_1 = num_pages_get();
|
||||||
SELECT * FROM t1 force index (b);
|
SELECT * FROM t1 force index (b);
|
||||||
SET @num_pages_2= num_pages_get();
|
SET @num_pages_2= num_pages_get();
|
||||||
|
|
Loading…
Reference in a new issue