Bug #44853 regex broken for adaptive hash cells used, node size, when monitoring > 5.1.28
Submitted: 13 May 2009 20:20 Modified: 21 Jul 2009 10:52
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.0.5 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any

[13 May 2009 20:20] Mark Leith
Description:
The regex used to parse the adaptive hash index section of SHOW INNODB STATUS for the cell size/used and node size is broken on versions > 5.1.28, because the "cells used" section was removed as part of Bug #36941. 

This is similar to Bug #39583, but not fixing the warnings, rather than just changing the log level. :)

How to repeat:
Try to use the mysql::innodbstatus::innodb_hash_node_heap variable in a graph:

  <com_mysql_merlin_server_graph_Design>
    
    <name>InnoDB Adaptive Hash Memory</name>
    <rangeLabel>MB</rangeLabel>
    
    <series>
      <label>Hash Node Size</label>
      <expression>( hash_size * 16384 ) / 1024 / 1024</expression>
    </series>
    
    <variables>
      <name>hash_size</name>
      <dcItem>
        <nameSpace>mysql</nameSpace>
        <className>innodbstatus</className>
        <attribName>innodb_hash_node_heap</attribName>
      </dcItem>
      <instance>local</instance>
    </variables>
    
  </com_mysql_merlin_server_graph_Design>

Suggested fix:
Make the "used cells" optional.
[19 May 2009 15:51] Jan Kneschke
------------------------------------------------------------
revno: 1325
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2009-05-19 17:48:46 +0200
message:
  fixed the parsing of the Hash-line in INNODB STATUS (fixes #44853)
  
    * reverts parts of #39583
    * runs a test against a 5.0.60 and a 5.1.34 SHOW INNODB STATUS
------------------------------------------------------------
revno: 1324
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2009-05-19 17:25:55 +0200
message:
  added a failing test for #44853
------------------------------------------------------------
revno: 1323
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2009-05-19 17:04:43 +0200
message:
  verify the attribute types 
------------------------------------------------------------
revno: 1322
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2009-05-19 16:09:51 +0200
message:
  added a first parse of the innodb-status for MySQL 5.1.34
------------------------------------------------------------
revno: 1321
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2009-05-19 15:56:14 +0200
message:
  added a empty test-suite for the innodb parser
------------------------------------------------------------
revno: 1320
committer: jan@mysql.com
branch nick: trunk
timestamp: Tue 2009-05-19 15:46:13 +0200
message:
  moved the SHOW INNODB STATUS-parsing into its own file to make the better unit-testable
  
    * job_collect_mysqld_innodb.c is the "string" based parser, leaving the mysql-query part
      in job_collect_mysql.c
[21 May 2009 16:12] Keith Russell
Patch installed in versions => 2.1.0.1048.
[26 Jun 2009 17:58] Enterprise Tools JIRA Robot
Diego Medina writes: 
Verified fixed on 2.1.0.1067
[21 Jul 2009 10:52] Tony Bedford
An entry was added to the 2.1.0 changelog:

The regular expression used to parse the adaptive hash index section of SHOW INNODB STATUS for the cell size/used and node size did not function correctly for versions of monitored server greater than 5.1.28. This was because the section of the expression dealing with “cells used” was removed as part of Bug#36941.