Bug #71818 Type column in SHOW PERFORMANCE_SCHEMA STATUS is redundant
Submitted: 24 Feb 2014 15:23 Modified: 25 Feb 2014 9:04
Reporter: Valeriy Kravchuk Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.6.16/5.7 OS:Any
Assigned to: Marc Alff CPU Architecture:Any
Tags: performance schema, show, STATUS
Triage: Needs Triage: D4 (Minor)

[24 Feb 2014 15:23] Valeriy Kravchuk
Description:
Manual, http://dev.mysql.com/doc/refman/5.6/en/show-engine.html, says nothing about the purpose and content of Type column in the output of  SHOW PERFORMANCE_SCHEMA STATUS:

mysql> SHOW ENGINE PERFORMANCE_SCHEMA STATUS\G
...
*************************** 3. row ***************************
  Type: performance_schema
  Name: events_waits_history.row_size
Status: 76
...

It has value "performance_schema" in all rows. These 2 facts make me thing that it is a leftover of some early design that assumed some more general status output for several "types", but then was abandoned.

In its current state this column is useless and makes it hard to read the results of the statement (especially in tabular format):

mysql> show engine performance_schema status;
+--------------------+----------------------------------------------------------
----+----------+
| Type               | Name
    | Status   |
+--------------------+----------------------------------------------------------
----+----------+
| performance_schema | events_waits_current.row_size
    | 184      |
| performance_schema | events_waits_current.row_count
...

| performance_schema | performance_schema.memory                                    | 82186848 |
+--------------------+--------------------------------------------------------------+----------+
155 rows in set (0,01 sec)

How to repeat:
Run:

show engine performance_schema status;

and enjoy the output, 155 times "performance_schema" in the "Type" column!

Suggested fix:
Performance schema rules, but there is no need to repeat its long name so many times without any clearly documented reason.

Please, remove 'Type' column entirely, to get the output like this:

mysql> show engine performance_schema status;
+--------------------------------------------------------------+----------+
| Name                                                         | Status   |
+--------------------------------------------------------------+----------+
| events_waits_current.row_size                                | 184      |
...
[24 Feb 2014 15:41] Miguel Solorzano
Thank you for the bug report. Verified how described.
[25 Feb 2014 9:03] Marc Alff
The column 'type' is the name of the storage engine.

The behavior of the 'SHOW ENGINE' statement is the same for all engines providing status information, such as Innodb, NDB and the performance schema.

Removing this column and as a result causing compatibility issues for every script or tool that parses the output of SHOW INNODB STATUS is not something that is desirable.

The column might not be very useful, but it works as intended, and this is clearly not a bug.