Bug #53378 commented out queries being executed!!
Submitted: 3 May 2010 14:59 Modified: 14 May 2010 18:41
Reporter: Daniel Katz Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:5.2.20 OS:Microsoft Windows (7)
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: block comments

[3 May 2010 14:59] Daniel Katz
I commented out a bunch of queries not in use (because the execute current statement hotkey is currently broken) and it still executed the queries in the comments and then just suppressed the output!!!

This is worry some especially since update / delete statements are used once and then commented out.

(This is also loosely related to the hotkey for execute single query (ctrl-enter) being run as execute all queries)

See example at: http://insidecase.com/temp/mysql_error_comments.jpg

How to repeat:
Write a few queries..

Comment some out.

Execute all.



Look for new job.

Suggested fix:
Suppress comments all together.

(And fix hotkey for execute current statement  bug: http://bugs.mysql.com/bug.php?id=53333).
[3 May 2010 15:18] MySQL Verification Team
Thank you for the bug report.
[4 May 2010 12:42] Sergei Tkachenko
Failed to reproduce.
Given that provided screenshot doesn't show whole statement in the log (see scrollbar slider position), I assume the effective statement follows the visible comment. All precursory comments are treated as part of the statement and appear in the log.
Please recheck.
[4 May 2010 17:53] Daniel Katz
You are correct.  I tried to reproduce this and it is acting the way you say it is.  The comments are part of the query immediately following.

I wonder if it makes sense for preceding comments to be considered as part of the current query?  I can make reasons for and against.

Maybe a suggested fix is to ignore / block comments until the first non-comment non whitespace character of a query?