Bug #81394 Unable to change performance_schema whilst super_read_only is enabled
Submitted: 12 May 2016 13:40 Modified: 18 Sep 2023 15:54
Reporter: Ceri Williams Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.7.12,5.7.15 OS:Any
Assigned to: CPU Architecture:Any
Tags: performance_schema, super_read_only, sys

[12 May 2016 13:40] Ceri Williams
Description:
Trying to make changes to the performance_schema is not possible whilst super_read_only is enabled. 

Since this is set for a reason it is undesirable to change it to be able to change instrumentation, etc.

How to repeat:
mysql [localhost] {msandbox} ((sys)) > set global super_read_only = 1;
Query OK, 0 rows affected (0.00 sec)

mysql [localhost] {msandbox} ((sys)) > UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES' where name like 'wait';
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement

mysql [localhost] {msandbox} ((sys)) > select @@version;
+-----------+
| @@version |
+-----------+
| 5.7.12    |
+-----------+

Suggested fix:
Bypass super_read_only for performance_schema and sys as done for being able to issue STOP SLAVE with relay_log_info_repository set to TABLE.
[12 May 2016 14:44] MySQL Verification Team
This is a feature request. I find it fully valid one.

Verified as a feature request.
[12 May 2016 17:02] MySQL Verification Team
Criticism accepted. Severity is changed.
[12 May 2016 17:22] Mark Leith
See also related Bug#81009 which is limiting TRUNCATE within the sys.ps_truncate_all_tables procedure.
[27 Sep 2016 21:23] Ceri Williams
This looks to have been fixed in 8.0.0, but still a problem in latest 5.7 release (5.7.15)