Bug #54390 Allow a special "trace" comment usage in MEM's query analyzer
Submitted: 10 Jun 2010 8:10
Reporter: Jonathon Coombes Email Updates:
Status: Verified Impact on me:
Category:MySQL Enterprise Monitor Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Mark Leith CPU Architecture:Any
Tags: mem, Merlin, quan, query analyzer

[10 Jun 2010 8:10] Jonathon Coombes
MEM allows the developer to see which query is not performing well, however, it does not allow the developer to trace the query back to the original code.

Query analyzer currently removes all comments from the query, presumably to optimise data transfer size. The problem here is that comments are used to track what part of the code has the query in it.

If MEM allows a special comment that can be used for tracing, this will help. This comment could be something like a "request-type id", "a script name" or whatever, but something which allows the developers to uniquely
recognise the part of the code which generates the query. This saves time and therefore is more productive adding a comment to the code is quite simple.

Perhaps there could be made an optional choice in MEM?

How to repeat:

Suggested fix:
Add a tracing comment that can be used by MEM to signify calling code for queries.
[24 Jun 2010 14:57] Enterprise Tools JIRA Robot
Mark Leith writes: 
Verified - we actually were not passing back any comments from the proxy, even for the example query, where we do maintain comments, and have section in the popup for them. 

We should just strip the first comment token for this new section, stripping all comments and filling in that section may not make sense for context sensitive comments within queries. 

Optionally provide some way of describing where the query came from in our part of the stack, as well from Proxy. 

For instance Connector/J uses the comment section to report:

"Reported by MySQL Enterprise Plugin for Connector/J ..."
[24 Jun 2010 15:23] Enterprise Tools JIRA Robot
Mark Leith writes: 
Note however, comments are *not* stripped for example queries - so you should already still see the comments in the full example query text.