Bug #41492 Query Analyzer "formatted" display incorrect for queries with "DATE_SUB()"
Submitted: 16 Dec 2008 9:47 Modified: 23 Jun 2009 16:34
Reporter: Roger Nay Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.0.0.7102 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[16 Dec 2008 9:47] Roger Nay
Description:
Due to the use of the DATE_SUB() function the query is not displayed correctly in the "formatted" tab when viewing the query with the Query Analyzer (truncated after the WHERE), "full" shows the complete query.

myslq> DELETE FROM FUS_DB_STATE WHERE LAST_CHECK < DATE_SUB(NOW(),INTERVAL 8 HOUR);

Here is the table definition used:

CREATE TABLE `fus_db_state` (
`SERVER_NAME` varchar(64) NOT NULL default '',
`LAST_CHECK` datetime NOT NULL default '0000-00-00 00:00:00',
`DB_VERSION` varchar(20) NOT NULL default '',
`DB_TYPE` varchar(20) NOT NULL default '',
PRIMARY KEY (`SERVER_NAME`,`DB_TYPE`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

How to repeat:
Create the database and run the query with the Query Analyzer enabled. View the results in the Query Analyzer.
[11 Feb 2009 15:30] Johannes Schlüter
I had a similar problem, the word "label" is missing in the formatted view:

"SELECT id , label FROM test WHERE label > 1" becomes "SELECT id  FROM test WHERE  > ?"
[11 Feb 2009 15:31] Johannes Schlüter
Screenshot

Attachment: qa_bug_41492.png (image/png, text), 30.98 KiB.