1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-20389 The test innodb.innodb_bug84958 fails intermittently

* Ensure no background purge is done;
* Better result showing actual number in case of failure;
* Higher and more safe difference threshold.
This commit is contained in:
Aleksey Midenkov
2019-08-20 15:24:32 +03:00
parent 6dd1d6cb90
commit 2850b8d844
2 changed files with 16 additions and 4 deletions

View File

@ -4,13 +4,18 @@
#
# Set up the test with a procedure and a function.
#
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
InnoDB 0 transactions not purged
CREATE PROCEDURE insert_n(start int, end int)
BEGIN
DECLARE i INT DEFAULT start;
START TRANSACTION;
WHILE i <= end do
INSERT INTO t1 VALUES (1, 2, 3) ON DUPLICATE KEY UPDATE c = i;
SET i = i + 1;
END WHILE;
COMMIT;
END~~
CREATE FUNCTION num_pages_get()
RETURNS INT
@ -51,9 +56,9 @@ SET @num_pages_1 = num_pages_get();
SELECT * FROM t1 force index (b);
a b c
SET @num_pages_2= num_pages_get();
SELECT @num_pages_2 - @num_pages_1 < 500;
@num_pages_2 - @num_pages_1 < 500
1
SELECT IF(@num_pages_2 - @num_pages_1 < 5000, 'OK', @num_pages_2 - @num_pages_1) num_pages_diff;
num_pages_diff
OK
#
# Commit and show the final record.
#
@ -76,6 +81,7 @@ test.t1 check status OK
#
disconnect con2;
disconnect con3;
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
DROP TABLE t1;
DROP PROCEDURE insert_n;
DROP FUNCTION num_pages_get;