Bug #27327 information_schema status views, variable_value conversion
Submitted: 21 Mar 2007 13:23 Modified: 11 Apr 2007 2:04
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.1.17-bk OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Sergey Glukhov

[21 Mar 2007 13:23] Peter Gulutzan
Description:
In information_schema tables session_status and
global_status, some items are representable as numeric,
because in effect they are like 'boolean' or 'enum'.
But after conversion to the data type of the
variable_value column, i.e. DECIMAL(22,7), they are
always 0.0000000. The items are:

VARIABLE_NAME              Possible VARIABLE_VALUE

Compression                0/1 (OFF/ON)
Rpl_status                 ?? ("not yet implemented")
Slave_running              0/1 (OFF/ON)
Ssl_session_cache_mode     30/etc. (as in ssl.h)

See also: Bug#26994
"I_S.GLOBAL_STATUS and I_S.SESSION_STATUS use floats
in VARIABLE_VALUES column"

How to repeat:
(As noted by Kolbe Kegel in comment for Bug#26994)
"
What good does it do for ON to turn into 0.00000 for goodness sakes?
At the very least, I would expect it to to be 1.0000!! (Slave_running)
"
[21 Mar 2007 13:46] Miguel Solorzano
Thank you for the bug report.
[27 Mar 2007 14:12] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/23014

ChangeSet@1.2504, 2007-03-27 19:07:54+05:00, gluh@mysql.com +9 -0
  Bug#27327 information_schema status views, variable_value conversion
  added convertion of Slave_running & SSL_session_cache_mode
  status variables into numeric values
[29 Mar 2007 14:21] Peter Gulutzan
Ssl_session_cache_mode is more complex and 'fixing' it
is not worth extra trouble. For purposes of this bug
report, it will be sufficient if the yes/no values are
0/1 values.
[29 Mar 2007 14:27] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/23310

ChangeSet@1.2525, 2007-03-29 19:25:07+05:00, gluh@mysql.com +5 -0
  Bug#27327 information_schema status views, variable_value conversion
  Type of 'Slave_running' status variable is changed to bool
[3 Apr 2007 9:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/23636

ChangeSet@1.2551, 2007-04-03 14:24:35+05:00, gluh@mysql.com +5 -0
  Bug#27327 information_schema status views, variable_value conversion
  Type of 'Slave_running' status variable is changed to bool
[9 Apr 2007 12:42] Bugs System
Pushed into 5.1.18-beta
[11 Apr 2007 2:04] Paul Dubois
Noted in 5.1.18 changelog.

For the INFORMATION_SCHEMA SESSION_STATUS and GLOBAL_STATUS tables,
some status values were incorrectly converted to the data type of the
VARIABLE_VALUE column.
[14 Apr 2007 1:32] Arjen Lentz
A patch is pasted in a comment (13 April 2007) to http://bugs.mysql.com/bug.php?id=26994 that fixes all values,  saves 110 lines of superflous code, and makes the output of the infoschema status tables perfectly in sync with the SHOW STATUS output (since other bugs have been filed and "accepted" regarding such inconsistencies, I presume this is a relevant consideration too).