Bug #85143 setup_objects: change defaults or add a variable
Description:
In a default installation, setup_consumers has instrumentation/timing disabled for mysql.% (just tables in 5.6, all objects in 5.7). This seems odd, as with things like the slave_* tables, innodb stats, etc I'd guess that everyone would want to instrument them.
The choice may have been made due to security concerns, I can't think of any - I mean, a statement like `update mysql.user set authentication_string=password('plaintext') where...` will be logged to events_statements_* tables by default! but with setup_objects? no risk I can think of.
How to repeat:
fresh install:
select * from performance_schema.setup_objects;
Suggested fix:
Well, like I said, I think it should default to on for mysql.%. That's valuable data being lost by people who have collection on but used default objects.
However, that might not happen! So, a setting that can be passed in a my.cnf woul work, too. Performance schema already has clever implementations of my.cnf variables (like how the setup_consumer ones and setup_instrument one work differently).
As a hacky workaround, we currently have a package that intalls automatically after mysql starts and runs "update performance_schema.setup_objects set enabled='YES',timed='YES' where object_schema='mysql' and object_name='%';" - but that's sloppy, and restarting it will overwrite manual changes.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 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 a default installation, setup_consumers has instrumentation/timing disabled for mysql.% (just tables in 5.6, all objects in 5.7). This seems odd, as with things like the slave_* tables, innodb stats, etc I'd guess that everyone would want to instrument them. The choice may have been made due to security concerns, I can't think of any - I mean, a statement like `update mysql.user set authentication_string=password('plaintext') where...` will be logged to events_statements_* tables by default! but with setup_objects? no risk I can think of. How to repeat: fresh install: select * from performance_schema.setup_objects; Suggested fix: Well, like I said, I think it should default to on for mysql.%. That's valuable data being lost by people who have collection on but used default objects. However, that might not happen! So, a setting that can be passed in a my.cnf woul work, too. Performance schema already has clever implementations of my.cnf variables (like how the setup_consumer ones and setup_instrument one work differently). As a hacky workaround, we currently have a package that intalls automatically after mysql starts and runs "update performance_schema.setup_objects set enabled='YES',timed='YES' where object_schema='mysql' and object_name='%';" - but that's sloppy, and restarting it will overwrite manual changes.