Bug #42245 Agent converts values 2052122097611 to 214748364
Submitted: 21 Jan 2009 16:15 Modified: 27 Feb 2009 14:14
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S2 (Serious)
Version:2.0.3.7134 OS:Any
Assigned to: MC Brown CPU Architecture:Any

[21 Jan 2009 16:15] Diego Medina
Description:
If some values from SHOW GLOBAL STATUS return something greater than 214748364, they are sent to the service manager as 214748364

How to repeat:
1- Have a proxy in between the agent and the mysqld and use the attached lua script

$ /bin/mysql-proxy --log-level=debug --log-file=proxy.log  --proxy-address=:53307 --proxy-backend-addresses=127.0.0.1:43307  --admin-address=:63307 --proxy-lua-script=bug.lua

2- Install and start service manager
3- Set log-level=debug on the agent's mysql-service-agent.ini file
4- Start the agent
5- On the terminal that you started the proxy, you will see a message "Current Value for Com_select", after a few minutes stop the agent and the proxy and look at the agent's log, you will see that the value for Com_Select is always 214748364
[21 Jan 2009 16:28] Diego Medina
And values 3.8797244402187e+18  are being sent as 3879724440218699776.000
[5 Feb 2009 17:03] Diego Medina
Important: It turns out not to be just values from SHOW GLOBAL STATUS, many other values that the agent sends to the service manager would be affected by this bug
[11 Feb 2009 18:52] Mark Leith
Pushed to trunk (rev 1200) and 2.0 branch (rev 1207), should be within version 2.0.5. 

revno: 1200
committer: Mark Leith leith@sun.com
branch nick: mysql-lb
timestamp: Wed 2009-02-11 18:40:05 +0000
message:
  Bug #42245 - Converted from strtol to g_ascii_strtoll and strtod to g_ascii_strtod to fix truncation of integers on 32bit systems
[24 Feb 2009 20:19] Diego Medina
Verified fixed on 2.0.5.7145
[27 Feb 2009 14:14] Tony Bedford
An entry was added to the 2.0.5 changelog:

When SHOW GLOBAL STATUS returned a value greater than 214748364, it was sent to the Service Manager as 214748364.