Bug #85030 Workbench Forward Engineer "Save to File ..." gives "Invalid arguement" error
Submitted: 16 Feb 2017 19:47 Modified: 8 May 2018 21:51
Reporter: Dean Toth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:6.3.9 OS:Windows (Win7-64)
Assigned to: CPU Architecture:Any

[16 Feb 2017 19:47] Dean Toth
Description:
(FYI: I just recently started using MySQL).
I'm going through the tutorials and trying the Model - Forward Engineering options in section 9.1.4.2 of Workbench Manual.
On both the "Forward Engineer to Database" window, "Review SQL Script" section and "Synchronize With Any Source", "Delete Changes" section there is a "Save to File ..." button. If I click the button, enter a path and file name (both of which I have tested manually outside of Workbench, i.e. I can create new files at that path) then click "Save" I get an error window. The Window title is "MySQL Workbench", the error title is "Save to File" and the Error text is: "Could not save to '<the path and file name I used>': Invalid argument". 
e.g. "Could not save to file 'E:\temp\test1.sql': Invalid argument"

How to repeat:
Open a Model and try either of the options:
1. Database - Forward Engineer, click next until the "Review SQL Script" window OR
2. Database - Synchronize With Any Source, click next until the "Delete Changes window

then click the "Save to File ..." button and attempt to save a file.
[16 Feb 2017 19:57] MySQL Verification Team
Thank you for the bug report. Verified as described.
[16 Feb 2017 20:15] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=85024 marked as duplicate of this one.
[27 Apr 2017 7:26] Mark Moran
I experience the same problem. Tried to run as administrator but it did not help.
[26 May 2017 0:28] christina chan
I have the same problem. I cannot "Save to File". I have to cut and paste into NOTEPAD and save it as .sql file using "Copy to Clipboard".  Workbench is not a good tool.
[14 Nov 2017 6:35] Stephen Zhao
I can confirm that this is broken. 6.3.9.10690321 (64-bit) Community Edition.
[23 Nov 2017 8:46] quanglai ho
food

Attachment: food.mwb (application/octet-stream, text), 13.42 KiB.

[8 May 2018 21:51] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.12 release, and here's the changelog entry:

A model exported as an SQL script could not be saved to disk when using
either the Forward Engineer to Database or the Synchronize With Any Source
wizard.

Thank you for the bug report.