Bug #80366 P_S does not show all Com_ status
Submitted: 15 Feb 2016 10:10 Modified: 15 Feb 2016 13:18
Reporter: Oli Sennhauser Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.7.11, 5.7.12 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any
Tags: com_, global status, P_S, performance schema

[15 Feb 2016 10:10] Oli Sennhauser
Description:
Performance Schema global_status table does not expose all Com_ status information.

How to repeat:
select * from performance_schema.global_status where variable_name like 'com%';
+--------------------+----------------+
| VARIABLE_NAME      | VARIABLE_VALUE |
+--------------------+----------------+
| Com_stmt_reprepare | 0              |
+--------------------+----------------+
show global status like 'com%';
+-----------------------------+-------+
| Variable_name               | Value |
+-----------------------------+-------+
| Com_admin_commands          | 0     |
| Com_assign_to_keycache      | 0     |
| Com_alter_db                | 0     |
| Com_alter_db_upgrade        | 0     |
| Com_alter_event             | 0     |
...

Suggested fix:
should be equal
[15 Feb 2016 11:43] MySQL Verification Team
Hello Oli,

Thank you for the report.

Thanks,
Umesh
[15 Feb 2016 13:18] Marc ALFF
This is actually the expected result.

COM_XYZ counters in SHOW STATUS historically counted how many times statement XYZ is executed.

This data is already collected in the performance schema statement instrumentation, so that there is no need to expose the same data duplicated in performance_schema.session_status or performance_schema.global_status.

See section "Statement Instrument Components" in
http://dev.mysql.com/doc/refman/5.7/en/performance-schema-instrument-naming.html

See 
http://dev.mysql.com/doc/refman/5.7/en/performance-schema-statement-tables.html

See
http://dev.mysql.com/doc/refman/5.7/en/statement-summary-tables.html

Tables
- performance_schema.events_statements_summary_by_thread_by_event_name
- performance_schema.events_statements_summary_global_by_event_name
are probably what you are looking for.

Closing as not a bug.