Bug #36885 Query analysis popup shows wrong 'formatted' SQL/nothing if it's a short stmnt
Submitted: 22 May 2008 12:33 Modified: 17 Dec 2009 11:55
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.0.0.6040 OS:Any
Assigned to: Kay Roepke CPU Architecture:Any
Tags: formatter, sqlparser

[22 May 2008 12:33] Carsten Segieth
Description:
if the SQL statement is short (not more than 1 line in the 'full' view) the 'formatted' view does not show anything.

Not sure, this "not more than one line" is the real reason, but with all I've tried this seems to be the reason. I've tried a lot of the statements of the Merlin DB itself.

May be it's only the last line of the formatted statement, that is not shown. Also it would be nice if the formatted statement would show a '... (truncated)' at the end, if it is truncated.

How to repeat:
- setup a system with a proxy for the Merlin DB itself
- select a 'commit' statement
- select 'formatted', 'full' and 'truncated'

Suggested fix:
- show statement even there is nothing to format in the statement
- show in the "formatted" view a '... (truncated)' at the end of a long, truncated statement
[23 Jul 2008 19:30] Andy Bang
Referenced in MEM beta README.
[30 Jul 2008 22:40] Marcos Palacios
In ver. 2.0.0.7017, the formatted text (for non-SELECT statements) shows the string "Could not format query."
[23 Nov 2009 22:06] Enterprise Tools JIRA Robot
Andy Bang writes: 
This is in build 2.2.0.1547.
[2 Dec 2009 20:37] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
tested OK with 2.2.0.1561
[17 Dec 2009 11:55] MC Brown
A note has been added to the 2.2.0 changelog: 

The formatted query view in the popup within the <guilabel>Query Analyzer</guilabel> tab could show an empty query if the query was short and could not be formatted properly.