mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Fixed monitor.test to handle statistics >= 10
This commit is contained in:
parent
71ee69c81c
commit
3a871c39a9
2 changed files with 21 additions and 27 deletions
|
@ -622,46 +622,46 @@ set global innodb_monitor_reset_all = default;
|
|||
# MONITORS
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 0
|
||||
SET GLOBAL innodb_monitor_enable='module_buffer_page';
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4);
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT
|
||||
buffer_page_written_index_leaf NNNN
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 1
|
||||
SET GLOBAL innodb_monitor_disable='module_buffer_page';
|
||||
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 0
|
||||
SET GLOBAL innodb_monitor_enable='%';
|
||||
INSERT INTO t1 VALUES (5), (6), (7), (8);
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT
|
||||
buffer_page_written_index_leaf NNNN
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 1
|
||||
SET GLOBAL innodb_monitor_disable='%';
|
||||
SET GLOBAL innodb_monitor_reset_all='%';
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 0
|
||||
SET GLOBAL innodb_monitor_enable='ALL';
|
||||
INSERT INTO t1 VALUES (9), (10), (11), (12);
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT
|
||||
buffer_page_written_index_leaf NNNN
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 1
|
||||
SET GLOBAL innodb_monitor_enable=default;
|
||||
SET GLOBAL innodb_monitor_disable=default;
|
||||
SET GLOBAL innodb_monitor_reset_all=default;
|
||||
|
|
|
@ -391,41 +391,35 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
|||
|
||||
let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`;
|
||||
|
||||
--replace_regex /[1-9]/NNNN/
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_enable='module_buffer_page';
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
--replace_regex /[1-9]/NNNN/
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_disable='module_buffer_page';
|
||||
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
|
||||
--replace_regex /[1-9]/NNNN/
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_enable='%';
|
||||
INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
--replace_regex /[1-9]/NNNN/
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_disable='%';
|
||||
SET GLOBAL innodb_monitor_reset_all='%';
|
||||
--replace_regex /[1-9]/NNNN/
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_enable='ALL';
|
||||
INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
--replace_regex /[1-9]/NNNN/
|
||||
SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
--disable_warnings
|
||||
|
|
Loading…
Reference in a new issue