Bug #49082 MEM agent fails when monitoring server 4.0.x due to CHARSET error
Submitted: 25 Nov 2009 0:11 Modified: 18 Jan 2010 14:54
Reporter: Lachlan Mulcahy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.1.0.1096 OS:Any
Assigned to: Mark Leith CPU Architecture:Any

[25 Nov 2009 0:11] Lachlan Mulcahy
Description:
When attempting to monitor a MySQL 4.0 series server, the agent fails with an error due to the lack of table-level CHARACTER SET support in 4.0 series.

2009-11-24 13:46:37: (critical) agent_mysqld.c:337: mysql_real_query('CREATE TABLE mysql.inventory ( name VARCHAR(64) NOT NULL PRIMARY KEY, value VARCHAR(64)) ENGINE=MYISAM DEFAULT CHARSET=utf8') on 'mysql' failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8' at line 1 (mysql-errno = 1064)

How to repeat:
Attempt to monitor a 4.0 MySQL Server with agent.

Suggested fix:
Add version comments to the CREATE SQL.

eg. CREATE .... /*!40100 DEFAULT CHARSET=utf8 */
[16 Dec 2009 16:03] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.1.1.1114.
[18 Jan 2010 13:27] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
tested OK with 2.1.1.1138 + 2.2.0.1606
[18 Jan 2010 14:54] MC Brown
A note has been added to the 2.1.1 changelog: 

Monitoring a MySQL 4.0 server would fail because MySQL 4.0 did not support table-level character set support.