Bug #64507 SQL Editor executes the query of the wrong tab after changing the tab order
Submitted: 1 Mar 2012 7:47 Modified: 13 Mar 2012 8:52
Reporter: Olag Ulga Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.37 OS:Any
Assigned to: CPU Architecture:Any
Tags: order, query, sql editor, tab

[1 Mar 2012 7:47] Olag Ulga
Description:
you have opened at least two tabs with different queries, you arange it as you like it. Then you press execute one of the queries (press the flash-sign, hit CTRL + Shift + Enter or choose Query --> Execute (All or selection) in the menu). Now the editor executes the wrong query (you recognise this because the wait symbol is displayed in the wrong tab and after the execution the wrong tab with the wrong query result gets selected.

this bug is not funny at all if you have tabs with delete statements, which you dont want to execute on the current database.

How to repeat:
- Start workbench
- Connect to your favorit sql-server under SQL-Development (leftest part)
- a new SQL Editor tab will be opened with one sub-tab SQL File 1
- Open a second tab: File --> New Query Tab (CTRL + T)
- Enter 'show databases' in the first tab labeled SQL File 1
- Enter 'show variables' in the second tab labeled SQL File 2
- Change the order of the two tabs (Drag and Drop the SQL File 2 on the SQL File 1
- Execute the SQL File 2 with the content 'show variables' (press the flash symbol)

->> Now the editor executes 'show databases' from SQL File 1 instead of 'show variables' from SQL File 2 and do not show a result. That the query was executed you can see in the Output panel in the category 'Action Output'

Suggested fix:
Expected behaviour: Execute the query of the displayed File.
[1 Mar 2012 7:50] Valeriy Kravchuk
Please, check if the same problem still happens with a newer version, 5.2.38.
[13 Mar 2012 8:52] Olag Ulga
Its fixed in 5.2.38. Sorry for the useless bug report, but i checked for updates per Help --> Check for Updates and there was no update available until then.
[28 May 2013 14:26] Adam Hardy
This bug is happening on version 5.2.47 (OS: Linux/Ubuntu 12.04).