mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
BUG#58858 : sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
Committing After latest merge. Modified check_pct procedure to check return value of wait condition instead of calling "dirty_pct". Adding Review comments: 1) Added comment for success variable value 2) Procedure check_pct changed For Adding BOOLEAN input and SELECT QUERY Change
This commit is contained in:
parent
18e4f23a88
commit
f25ab9fe22
2 changed files with 9 additions and 8 deletions
|
|
@ -64,12 +64,12 @@ SET last = pct;
|
||||||
END IF;
|
END IF;
|
||||||
END WHILE;
|
END WHILE;
|
||||||
END//
|
END//
|
||||||
CREATE PROCEDURE check_pct(IN num DECIMAL)
|
CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
|
||||||
BEGIN
|
BEGIN
|
||||||
IF (dirty_pct() < num) THEN
|
IF (success_on_wait > 0) THEN
|
||||||
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
||||||
ELSE
|
ELSE
|
||||||
SELECT 'ABOVE_MAX' AS PCT_VALUE;
|
SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
|
||||||
END IF;
|
END IF;
|
||||||
END//
|
END//
|
||||||
CREATE TABLE t1(
|
CREATE TABLE t1(
|
||||||
|
|
@ -83,7 +83,7 @@ CALL add_until(10);
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
CALL add_records(500);
|
CALL add_records(500);
|
||||||
'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
||||||
CALL check_pct(10);
|
CALL check_pct(1);
|
||||||
PCT_VALUE
|
PCT_VALUE
|
||||||
BELOW_MAX
|
BELOW_MAX
|
||||||
DROP PROCEDURE add_records;
|
DROP PROCEDURE add_records;
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,12 @@ BEGIN
|
||||||
END WHILE;
|
END WHILE;
|
||||||
END//
|
END//
|
||||||
|
|
||||||
CREATE PROCEDURE check_pct(IN num DECIMAL)
|
CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
|
||||||
BEGIN
|
BEGIN
|
||||||
IF (dirty_pct() < num) THEN
|
IF (success_on_wait > 0) THEN
|
||||||
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
SELECT 'BELOW_MAX' AS PCT_VALUE;
|
||||||
ELSE
|
ELSE
|
||||||
SELECT 'ABOVE_MAX' AS PCT_VALUE;
|
SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
|
||||||
END IF;
|
END IF;
|
||||||
END//
|
END//
|
||||||
|
|
||||||
|
|
@ -155,7 +155,8 @@ let $wait_condition= SELECT (dirty_pct() <= @@global.innodb_max_dirty_pages_pct)
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
--echo 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
--echo 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
|
||||||
CALL check_pct(10);
|
# Value For $sucess will be set from include/wait_condition.inc file. It can have values 1 or 0. It will be 1 if dirty_pct() <= @@global.innodb_max_dirty_pages_pct else it will be 0.
|
||||||
|
eval CALL check_pct($success);
|
||||||
DROP PROCEDURE add_records;
|
DROP PROCEDURE add_records;
|
||||||
DROP PROCEDURE add_until;
|
DROP PROCEDURE add_until;
|
||||||
DROP PROCEDURE check_pct;
|
DROP PROCEDURE check_pct;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue