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.