Bug #53275 File->Save only saves current selection, causing loss of data for .sql scripts
Submitted: 29 Apr 2010 4:56 Modified: 12 May 2010 9:44
Reporter: Jack Fruh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.20 OS:MacOS (10.6.3)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: overwrites, save, selection

[29 Apr 2010 4:56] Jack Fruh
Description:
When you are using workbench to develop scripts, 
if you happen to have some sql selected when you hit command-S (or File->Save)
the file is saved with only the selection.
I did this just now and lost hours worth of work - very frustrating!

How to repeat:
open MySQL workbench.
open a .sqlfile to edit
create an query - mine was a series of update statements....

Select only a few lines of the script.
hit ctrl-s
open the file in a text editor.
Note that most of your script is gone.

Suggested fix:
File Save, should ALWAYS save everything in the editor window for that file.
[29 Apr 2010 5:56] Valeriy Kravchuk
I do not see this problem on XP, entire script is saved whatever selection is. Looks like Mac OS X-specific bug.
[29 Apr 2010 18:03] Valeriy Kravchuk
Verified just as described on Mac OS X 10.5.x.
[6 May 2010 14:34] Mike Lischke
Fixed in repository.
[10 May 2010 16:32] Johannes Taxacher
fix confirmed in repository
[12 May 2010 9:44] Tony Bedford
An entry has been added to the 5.2.21 changelog:

In the SQL Editor, if some script text was highlighted, and Ctrl-S was pressed to save the script, only the highlighted text was saved to the file.