Description:
In MySQL 5.7.9 I want to configure 2 different settings which don't use their defaults.
So /etc/my.cnf says:
performance_schema_instrument='wait/lock/metadata/sql/mdl=1'
performance_schema_instrument='memory/%=1'
The problem is that to set these settings they need to be configured differently.
This is because there are no 'timed' settings for P_S.setup_instruments but there are for wait/% values.
How to repeat:
My initial attempt has been to do:
(a) update setup_instruments set enabled = 'YES', TIMED= 'YES' where name = 'wait/lock/metadata/sql/mdl';
then
(b) update setup_instruments set enabled = 'YES', TIMED= 'YES' where name like 'memory/%';
but given I'm doing this via a script the TIMED column does not change from TIMED='NO', so my script thinks it has not configured the change correctly.
This requires my script to have knowledge of which setup_instruments settings have timed values and which don't.
Suggested fix:
(1) in MySQL 5.7 if I run query (b) please generate a warning that I'm trying to update a column which can't be changed if this is the case
(2) in MySQL 5.8 please add a column such as HAS_TIMER_INFO ('YES'/'NO') which I can use to allow me to only try to change the TIMED column if HAS_TIMER_INFO = 'YES'. That is easy to add to my SQL script and avoids me having to hard-code knowledge into the script of whether each instruments has or doesn't not have TIMER support etc.
Thus I can split (b) into 2 queries and avoiding hard-coded knowledge in scripts about P_S content.
(c) update setup_instruments set enabled = 'YES' where name like 'memory/%';
(d) update setup_instruments set TIMED = 'YES' where name like 'memory/%' and HAS_TIMER_INFO = 'YES'
[30 Nov 2015 20:17]
Simon Mudd
Sorry: there are no TIMED values for p_s.setup_instruments memory/% values.
[18 Jun 2016 21:35]
Omer Barnir
Posted by developer:
Reported version value updated to reflect release name change from 5.8 to 8.0
Page generated in 0.050 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.
Description: In MySQL 5.7.9 I want to configure 2 different settings which don't use their defaults. So /etc/my.cnf says: performance_schema_instrument='wait/lock/metadata/sql/mdl=1' performance_schema_instrument='memory/%=1' The problem is that to set these settings they need to be configured differently. This is because there are no 'timed' settings for P_S.setup_instruments but there are for wait/% values. How to repeat: My initial attempt has been to do: (a) update setup_instruments set enabled = 'YES', TIMED= 'YES' where name = 'wait/lock/metadata/sql/mdl'; then (b) update setup_instruments set enabled = 'YES', TIMED= 'YES' where name like 'memory/%'; but given I'm doing this via a script the TIMED column does not change from TIMED='NO', so my script thinks it has not configured the change correctly. This requires my script to have knowledge of which setup_instruments settings have timed values and which don't. Suggested fix: (1) in MySQL 5.7 if I run query (b) please generate a warning that I'm trying to update a column which can't be changed if this is the case (2) in MySQL 5.8 please add a column such as HAS_TIMER_INFO ('YES'/'NO') which I can use to allow me to only try to change the TIMED column if HAS_TIMER_INFO = 'YES'. That is easy to add to my SQL script and avoids me having to hard-code knowledge into the script of whether each instruments has or doesn't not have TIMER support etc. Thus I can split (b) into 2 queries and avoiding hard-coded knowledge in scripts about P_S content. (c) update setup_instruments set enabled = 'YES' where name like 'memory/%'; (d) update setup_instruments set TIMED = 'YES' where name like 'memory/%' and HAS_TIMER_INFO = 'YES'