Bug #26967 SHOW PROFILE: Inconsistent output capitalization
Submitted: 8 Mar 2007 18:00 Modified: 12 Mar 2007 23:32
Reporter: Paul DuBois Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.37 OS:Any (all)
Assigned to: Assigned Account CPU Architecture:Any

[8 Mar 2007 18:00] Paul DuBois
Description:
The values displayed in the Status column of
SHOW PROFILE output are inconsistently capitalized:

mysql> show profile;
+----------------------+------------+
| Status               | Duration   |
+----------------------+------------+
| checking permissions | 0.00001700 | 
| Opening tables       | 0.00005000 | 
| System lock          | 0.00010700 | 
| Table lock           | 0.00000800 | 
| init                 | 0.00001200 | 
| optimizing           | 0.00001700 | 
| statistics           | 0.00001000 | 
| preparing            | 0.00001700 | 
| executing            | 0.00001700 | 
| checking permissions | 0.00001200 | 
| Sending data         | 0.03020000 | 
| end                  | 0.00045600 | 
| query end            | 0.00003300 | 
| freeing items        | 0.00000900 | 
| closing tables       | 0.00002400 | 
| removing tmp table   | 0.00000800 | 
| closing tables       | 0.00007100 | 
| logging slow query   | 0.00001100 | 
| cleaning up          | 0.00000700 | 
+----------------------+------------+

Note how some of the values begin with a capital
letter and the others do not.

This is not a "bug," I suppose, but it looks bad.

How to repeat:
See above.

Suggested fix:
Use a consistent convention for displaying Status
values.  Either initial-cap all of the values, or
none of them.
[12 Mar 2007 23:32] MySQL Verification Team
Thank you for the bug report.

mysql> show profile;
+--------------------+------------+
| Status             | Duration   |
+--------------------+------------+
| Opening tables     | 0.00007800 |
| System lock        | 0.00001700 |
| Table lock         | 0.00000800 |
| init               | 0.00001300 |
| optimizing         | 0.00004700 |
| statistics         | 0.00000700 |
| preparing          | 0.00002000 |
| executing          | 0.00001500 |
| Sending data       | 0.00000600 |
| end                | 0.00156200 |
| query end          | 0.00001000 |
| freeing items      | 0.00000700 |
| closing tables     | 0.00001200 |
| logging slow query | 0.00001100 |
| cleaning up        | 0.00000400 |
+--------------------+------------+
15 rows in set (0.00 sec)
[28 Mar 2007 16:26] Chad MILLER
This isn't really a Community bug.  This exists in enterprise also.  Profiling only makes it more visible.

I'll update all proc_info constant strings and add a DBUG_ASSERT that the first character is uppercase.
[21 Dec 2014 11:15] Daniƫl van Eeden
SHOW PROFILE is deprecated as of MySQL 5.6.7 and will be removed in a future MySQL release, but this is also happening when Performance Schema is used in 5.6.22.

mysql [performance_schema] > select EVENT_NAME from events_stages_history_long group by EVENT_NAME;
+--------------------------------+
| EVENT_NAME                     |
+--------------------------------+
| stage/sql/checking permissions |
| stage/sql/cleaning up          |
| stage/sql/closing tables       |
| stage/sql/Creating sort index  |
| stage/sql/Creating tmp table   |
| stage/sql/end                  |
| stage/sql/executing            |
| stage/sql/freeing items        |
| stage/sql/init                 |
| stage/sql/Opening tables       |
| stage/sql/optimizing           |
| stage/sql/preparing            |
| stage/sql/query end            |
| stage/sql/removing tmp table   |
| stage/sql/Sending data         |
| stage/sql/Sorting result       |
| stage/sql/statistics           |
| stage/sql/System lock          |
+--------------------------------+
18 rows in set (0.00 sec)