Commit ab56cbcd authored by Marko Mäkelä's avatar Marko Mäkelä

Stabilize and clean up a test

The counter buffer_flush_background_total_pages may be unreliable,
because pages can be flushed in different means.
So, let us only check INNODB_BUFFER_POOL_PAGES_FLUSHED.
parent d61c5696
...@@ -141,18 +141,9 @@ WHERE NAME='test/t1'; ...@@ -141,18 +141,9 @@ WHERE NAME='test/t1';
OTHER_INDEX_SIZE OTHER_INDEX_SIZE
1 1
ALTER TABLE t1 DROP INDEX `sidx`; ALTER TABLE t1 DROP INDEX `sidx`;
INSERT INTO t1 () VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); INSERT INTO t1 (a) SELECT * FROM seq_1_to_544;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
SELECT NAME, SUBSYSTEM FROM INFORMATION_SCHEMA.INNODB_METRICS
WHERE NAME="buffer_LRU_batch_flush_total_pages" AND COUNT > 0;
NAME SUBSYSTEM
buffer_LRU_batch_flush_total_pages buffer
SELECT (variable_value > 0) FROM information_schema.global_status SELECT (variable_value > 0) FROM information_schema.global_status
WHERE LOWER(variable_name) LIKE 'INNODB_BUFFER_POOL_PAGES_FLUSHED'; WHERE LOWER(variable_name) LIKE 'INNODB_BUFFER_POOL_PAGES_FLUSHED';
(variable_value > 0) (variable_value > 0)
......
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_sequence.inc
# Ensure that the history list length will actually be decremented by purge. # Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
...@@ -123,18 +124,10 @@ WHERE NAME='test/t1'; ...@@ -123,18 +124,10 @@ WHERE NAME='test/t1';
# Work around MDEV-13942, Dropping the spatial index to avoid the possible hang # Work around MDEV-13942, Dropping the spatial index to avoid the possible hang
ALTER TABLE t1 DROP INDEX `sidx`; ALTER TABLE t1 DROP INDEX `sidx`;
INSERT INTO t1 () VALUES (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); INSERT INTO t1 (a) SELECT * FROM seq_1_to_544;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
INSERT INTO t1 (a) SELECT NULL FROM t1;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
SELECT NAME, SUBSYSTEM FROM INFORMATION_SCHEMA.INNODB_METRICS
WHERE NAME="buffer_LRU_batch_flush_total_pages" AND COUNT > 0;
SELECT (variable_value > 0) FROM information_schema.global_status SELECT (variable_value > 0) FROM information_schema.global_status
WHERE LOWER(variable_name) LIKE 'INNODB_BUFFER_POOL_PAGES_FLUSHED'; WHERE LOWER(variable_name) LIKE 'INNODB_BUFFER_POOL_PAGES_FLUSHED';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment