Bug #58229 Add unit specification to I_S.GLOBAL_VARIABLES
Submitted: 16 Nov 2010 15:28 Modified: 17 Nov 2010 7:13
Reporter: Daniël van Eeden Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S4 (Feature request)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[16 Nov 2010 15:28] Daniël van Eeden
Description:
The GLOBAL_VARIABLES table has two columns, one for the name of the variable and one for the value. For some settings it's not directly clear in which unit the value is.

mysql> EXPLAIN INFORMATION_SCHEMA.GLOBAL_VARIABLES;
+----------------+---------------+------+-----+---------+-------+
| Field          | Type          | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| VARIABLE_NAME  | varchar(64)   | NO   |     |         |       |
| VARIABLE_VALUE | varchar(1024) | YES  |     | NULL    |       |
+----------------+---------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

How to repeat:
EXPLAIN INFORMATION_SCHEMA.GLOBAL_VARIABLES

Suggested fix:
Add VARIABLE_UNIT to I_S.GLOBAL_VARIABLES which contains a unit like 'seconds,miliseconds,kilobyte,boolean,path,collation.

Use KiB, s, ms or full names?

Use KiB/thread if something is thread specific?
[17 Nov 2010 7:13] Valeriy Kravchuk
Thank you for the feature request.
[4 Jul 2011 9:41] MySQL Verification Team
Another related feature:
Bug 12719455 - ALLOW HARDCODED DEFAULT VALUES OF VARIABLES TO BE QUERIED VIA I_S
[30 May 2016 13:37] Daniël van Eeden
Would also be nice to know if it's an int, boolean or string
[8 Sep 2016 16:53] Simon Mudd
Also as per INNODB_METRICS perhaps add:

  `COMMENT` varchar(193) NOT NULL DEFAULT ''

Or alternatively make SHOW CREATE TABLE INFORMATION_SCHEMA.GLOBAL_VARIABLES show a comment for each column having basically the same information.