Bug #49870 FIle extension not selected when Exporting Results
Submitted: 22 Dec 2009 8:52 Modified: 11 Jan 2010 17:05
Reporter: Simon Hambly Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.11 beta OS:MacOS (10.5.8)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Application

[22 Dec 2009 8:52] Simon Hambly
Description:
If you export results to .csv file (via Query -> Export Results...), then in the Export Results dialog after you browse and select an existing file (e.g. results.csv) the extension (.csv in this case) is removed from the end of the file path.

So when you click the Export button a new file (results with no .csv) is created instead of overwriting the exiting file as expected. 

How to repeat:
- Start Workbench
- Open a connection and run a query.
- Export the results via Query -> Export Results...
- Save a file in .csv format (e.g. results.csv),
- Export the results again via Query -> Export Results
- Click browse and select the file you just exported
- Note the .csv is missing in the File Path field.
- Click Export, not the new file results (with .csv missing) is created

note: if not explicitly stated then I've accepted the default options in the dialog box.

Suggested fix:
Don't remove the file extension from File Path field when selecting an existing file.
[6 Jan 2010 8:00] Mike Lischke
Fixed in 5.2
[7 Jan 2010 13:34] Johannes Taxacher
fix confirmed. will be included in 5.2.12
[11 Jan 2010 17:05] Tony Bedford
An entry has been added to the 5.2.12 changelog:

In the SQL Editor, when using the Query, Export Results... menu item, the file extension was omitted when selection of an existing output file was made.