Bug #66286 Unreliable Execute Current Statement (hot-key) on New SQL Editor Tabs
Submitted: 9 Aug 2012 17:38 Modified: 10 Aug 2012 0:57
Reporter: Mike Reid Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.41 OS:MacOS (10.7.4)
Assigned to: CPU Architecture:Any
Tags: command, enter, execute current statement, run query, sql editor

[9 Aug 2012 17:38] Mike Reid
Description:
I am noticing weird behavior in regards to Execute Current Statement command (Command + Enter)

I find that I am having to hit Command-Enter two to three times before my query is actually executed. It seems to be something related to running SQL on a New Tab... it always _eventually_ works (subsequent attempts usually aren't an issue) ...typically it's the first time running SQL in a fresh tab.

Anyone else experiencing this on v5.2.41 (OS X)?

How to repeat:
1. Connect to a database
2. Open a new tab
3. Enter some SQL (e.g. show processlist)
4. Hit "Command + Enter" to run

NOTE: You will see the "Query" toolbar menu option at the top flash, even when the query is not executed

5. Watch and you may (or may not) see that your query has been executed.

In the event that it did run, repeat from step 2. (new tab, enter SQL, run query hot-key) ...it is reliably un-reliable, to say the least.

One way that I can almost always reproduce this is when COPY/PASTING SQL and not releasing Command key:

1. Copy some SQL to your clipboard: SHOW PROCESSLIST
2. Open New Tab using hot-key (Command+T) -- DON'T let go of Command key!
3. Paste the SQL using hot-key (Command+V) -- STILL holding Command key from Step 2.
4. Execute the SQL using hot-key (Command+Enter) -- STILL holding Command key from Step 3

5. The query should run, but it almost never does. You have to release the Command key, or run the execute command twice.

Suggested fix:
Ensure that a query is always executed when invoked via hot-key command.
[9 Aug 2012 17:48] Valeriy Kravchuk
Looks like a duplicate of Bug #66220. Please, check.
[9 Aug 2012 17:56] Mike Reid
Yes, it appears to be a duplicate. Something definitely changed in 5.2.41 that executing queries is not consistent.
[10 Aug 2012 0:57] Alfredo Kojima
This is a duplicate of bug #66220