mariadb/mysql-test/suite/innodb/r/page_cleaner.result
Marko Mäkelä 1756b0f37d MDEV-35813: more robust test case
Let us integrate the test case with innodb.page_cleaner so that there
will be less interference from log writes due to checkpoints.
Also, make the test compatible with ./mtr --cursor-protocol.
2025-03-18 10:41:38 +02:00

37 lines
1.6 KiB
Text

SET @save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
SET GLOBAL innodb_max_dirty_pages_pct=0.0;
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
connect prevent_purge,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
SET GLOBAL innodb_max_purge_lag_wait=0;
SET GLOBAL innodb_max_dirty_pages_pct=90.0;
SELECT variable_value INTO @log_writes FROM information_schema.global_status
WHERE variable_name='innodb_log_writes';
BEGIN;
INSERT INTO t SELECT * FROM seq_1_to_500;
INSERT INTO t SELECT * FROM seq_501_to_1000;
INSERT INTO t SELECT * FROM seq_1001_to_1500;
INSERT INTO t SELECT * FROM seq_1501_to_2000;
INSERT INTO t SELECT * FROM seq_2001_to_2500;
INSERT INTO t SELECT * FROM seq_2501_to_3000;
INSERT INTO t SELECT * FROM seq_3001_to_3500;
INSERT INTO t SELECT * FROM seq_3501_to_4000;
INSERT INTO t SELECT * FROM seq_4001_to_4500;
INSERT INTO t SELECT * FROM seq_4501_to_5000;
ROLLBACK;
SELECT if(variable_value-@log_writes<10,'ok',variable_value-@log_writes)
FROM information_schema.global_status WHERE variable_name='innodb_log_writes';
if(variable_value-@log_writes<10,'ok',variable_value-@log_writes)
ok
disconnect prevent_purge;
SELECT variable_value>0 FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
variable_value>0
1
SET GLOBAL innodb_max_dirty_pages_pct=0.0;
DROP TABLE t;
SET GLOBAL innodb_max_dirty_pages_pct = @save_pct;
SET GLOBAL innodb_max_dirty_pages_pct_lwm = @save_pct_lwm;