Bug #84065 innodb_monitor_enable and innodb_monitor_disable do not clear each other
Description:
When updating the global variables the previous item is not adjusted, so they both may say 'all'.
select @@version, @@innodb_monitor_enable, @@innodb_monitor_disable;
+------------+-------------------------+--------------------------+
| @@version | @@innodb_monitor_enable | @@innodb_monitor_disable |
+------------+-------------------------+--------------------------+
| 5.6.28-log | all | all |
+------------+-------------------------+--------------------------+
Without going to the status field of the INFORMATION_SCHEMA.INNODB_METRICS table there is no way to know which variable is correct. Whichever was updated last will take precedence.
How to repeat:
db2 (none)> set global innodb_monitor_disable='all';
Query OK, 0 rows affected (0.00 sec)
db2 (none)>set global innodb_monitor_enable='all';
Query OK, 0 rows affected (0.00 sec)
db2 (none)>select @@innodb_monitor_enable, @@innodb_monitor_disable;
+-------------------------+--------------------------+
| @@innodb_monitor_enable | @@innodb_monitor_disable |
+-------------------------+--------------------------+
| all | all |
+-------------------------+--------------------------+
1 row in set (0.00 sec)
db2 (none)>select distinct status from INFORMATION_SCHEMA.INNODB_METRICS;
+---------+
| status |
+---------+
| enabled |
+---------+
1 row in set (0.01 sec)
db2 (none)> set global innodb_monitor_disable='all';
Query OK, 0 rows affected (0.00 sec)
db2 (none)>select @@innodb_monitor_enable, @@innodb_monitor_disable;
+-------------------------+--------------------------+
| @@innodb_monitor_enable | @@innodb_monitor_disable |
+-------------------------+--------------------------+
| all | all |
+-------------------------+--------------------------+
1 row in set (0.00 sec)
db2 (none)>select distinct status from INFORMATION_SCHEMA.INNODB_METRICS;
+---------+
| status |
+---------+
| disabled |
+---------+
1 row in set (0.01 sec)
Suggested fix:
When updating one of the variables to all, if the same thing is in the other variable then set it to NULL
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.