Commit e5c9904e authored by Sergei Golubchik's avatar Sergei Golubchik

make innodb.monitor test idempotent

parent 41296a07
......@@ -213,6 +213,7 @@ icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
set global innodb_monitor_disable = All;
select name from information_schema.innodb_metrics where enabled;
name
......@@ -745,6 +746,43 @@ DROP TABLE t1;
DROP TABLE fl2;
DROP TABLE fl1;
DROP TABLE fl0;
SET GLOBAL innodb_monitor_enable=default;
SET GLOBAL innodb_monitor_disable=default;
SET GLOBAL innodb_monitor_reset_all=default;
set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
set global innodb_monitor_disable = 'buffer\\_f%';
set global innodb_monitor_disable = 'buffer\\_page\\_%';
set global innodb_monitor_disable = 'c%';
set global innodb_monitor_disable = 'ddl%';
set global innodb_monitor_disable = 'dml\\_reads%';
set global innodb_monitor_disable = 'icp%';
set global innodb_monitor_disable = 'index\\_p%';
set global innodb_monitor_disable = 'innodb\\_di%';
set global innodb_monitor_disable = 'innodb\\_l%';
set global innodb_monitor_disable = 'innodb\\_m%';
set global innodb_monitor_disable = 'lock\\_re%';
set global innodb_monitor_disable = 'lock\\_ta%';
set global innodb_monitor_disable = 'log%';
set global innodb_monitor_disable = 'm%';
set global innodb_monitor_disable = 'p%';
set global innodb_monitor_disable = 't%';
set global innodb_monitor_enable = 'log_padded';
set global innodb_monitor_enable = 'log\\_w%';
set global innodb_monitor_enable = 'trx_rseg_history_len';
set global innodb_monitor_enable = 'trx_undo_slots_cached';
set global innodb_monitor_enable=default;
Warnings:
Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
set global innodb_monitor_disable=default;
Warnings:
Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
set global innodb_monitor_reset_all=default;
Warnings:
Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
select name, orig.enabled, new.enabled from
orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
where orig.enabled != new.enabled;
name enabled enabled
......@@ -5,11 +5,11 @@
# sys_vars.innodb_monitor_enable_basic
--source include/have_innodb.inc
# Test turn on/off the monitor counter with "all" option
# By default, they will be off.
select name, if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics;
create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
set global innodb_monitor_disable = All;
select name from information_schema.innodb_metrics where enabled;
......@@ -557,8 +557,38 @@ DROP TABLE fl2;
DROP TABLE fl1;
DROP TABLE fl0;
--disable_warnings
SET GLOBAL innodb_monitor_enable=default;
SET GLOBAL innodb_monitor_disable=default;
SET GLOBAL innodb_monitor_reset_all=default;
--enable_warnings
set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
set global innodb_monitor_disable = 'buffer\\_f%';
set global innodb_monitor_disable = 'buffer\\_page\\_%';
set global innodb_monitor_disable = 'c%';
set global innodb_monitor_disable = 'ddl%';
set global innodb_monitor_disable = 'dml\\_reads%';
set global innodb_monitor_disable = 'icp%';
set global innodb_monitor_disable = 'index\\_p%';
set global innodb_monitor_disable = 'innodb\\_di%';
set global innodb_monitor_disable = 'innodb\\_l%';
set global innodb_monitor_disable = 'innodb\\_m%';
set global innodb_monitor_disable = 'lock\\_re%';
set global innodb_monitor_disable = 'lock\\_ta%';
set global innodb_monitor_disable = 'log%';
set global innodb_monitor_disable = 'm%';
set global innodb_monitor_disable = 'p%';
set global innodb_monitor_disable = 't%';
set global innodb_monitor_enable = 'log_padded';
set global innodb_monitor_enable = 'log\\_w%';
set global innodb_monitor_enable = 'trx_rseg_history_len';
set global innodb_monitor_enable = 'trx_undo_slots_cached';
set global innodb_monitor_enable=default;
set global innodb_monitor_disable=default;
set global innodb_monitor_reset_all=default;
select name, orig.enabled, new.enabled from
orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
where orig.enabled != new.enabled;
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