Bug #85143 setup_objects: change defaults or add a variable
Submitted: 23 Feb 2017 6:54 Modified: 28 Feb 2017 12:39
Reporter: Trey Raymond Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Performance Schema Severity:S4 (Feature request)
Version:5.6, 5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: setup_objects

[23 Feb 2017 6:54] Trey Raymond
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.
[28 Feb 2017 12:39] MySQL Verification Team
Hello Trey Raymond,

Thank you for the feedback and feature request!