Bug #54362 Double Click on Table (Listed at bottom, not left) wipes currently open script
Submitted: 9 Jun 2010 11:07 Modified: 17 Jun 2010 16:13
Reporter: Simon . Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.22 R6091 OS:Any (Windows 7, Mac OS X)
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: double click, result, script, table, Wipe

[9 Jun 2010 11:07] Simon .
Description:
Issue related to the SQL editor in MySQL workbench.

Like the older version "MySQL Query Browser" You can double click on a table and it generates a select query and shows the results.

This feature (usable when double clicking on a table, at the bottom, not the tree on the left) completely wipes the current open script and replaces it with the Edit command. I have lost several scripts before i realised this was the cause.

When double clicking on a table can this be done in a new script tab, or append to the bottom of the current script.

thanks,
Simon

How to repeat:
Double click on any table with a script open (using the list at the bottom, not the tree on the left)

Suggested fix:
Put Edit command in a new tab, rather than wiping the currently selected script.

Or alternatively append to the end of the script
[14 Jun 2010 12:46] Alfredo Kojima
When dbl-clicking a table, a new script tab should be added where the EDIT command is set, unless the current one is empty.

Note: Undo is working, so you can just Undo if you accidentally replace your query.
[14 Jun 2010 12:49] Simon .
"Undo is working, so you can just Undo if you accidentally replace
your query."

Yeah but if your working with a large number of scripts it can be easy to not notice, I've done it a few times.
[14 Jun 2010 12:57] Alfredo Kojima
Bug #54248 marked as duplicate.

Same thing happens for the SELECT * menu  commands
[16 Jun 2010 21:39] Johannes Taxacher
fix confirmed in repository.
this now opens a new text-tab whenever the current text-tab is not empty
[17 Jun 2010 16:13] Tony Bedford
An entry has been added to the 5.2.23 changelog:

In the SQL Editor, if a table in the Overview tab was double clicked, the query generated replaced code already typed into the SQL Query tab, resulting in the loss of that code.