Description:
orward Engineer SQL Script wizard creates valid file until last button "Finish" will be pressed. Pressing Finish button couses cutting last lines (about 2.5 lines) from output sql file.
For instance output sql file:
--------before Finish button pressed (step: Review and edit the generated script and press Finish to save.)
[..]
INSERT INTO `databasename`.`messages` (`id`, `name`, `title`, `content`, `mestype_id`, `created`, `modified`, `lang`) VALUES (7, 'error', 'Błąd systemu', '<p>Wystąpił błąd:</p>\n<p>[=details=]</p>\n<p>Located: [=file=]:[=line=]</p>', 1, NULL, NULL, 'pol');
INSERT INTO `databasename`.`messages` (`id`, `name`, `title`, `content`, `mestype_id`, `created`, `modified`, `lang`) VALUES (8, 'custom', 'Wiadomość', '[=body=]', 1, NULL, NULL, 'pol');
COMMIT;
--------after Finish button. Close Forward Engineer SQL Script wizard
[..]
INSERT INTO `databasename`.`messages` (`id`, `name`, `title`, `content`, `mestype_id`, `created`, `modified`, `lang`) VALUES (7, 'error', 'Błąd systemu', '<p>Wystąpił błąd:</p>\n<p>[=details=]</p>\n<p>Located: [=file=]:[=line=]</p>', 1, NULL, NULL, 'pol');
INSERT INTO `databasename`.`messages` (`id`, `name`, `title`, `content`, `mestype_id`, `created`, `modified`, `lang`) VALUES (8, 'custom', 'Wiadomość', '[=body=]', 1, NULL, NU
Tested on two independents databases - same results.
This behavior appears only with objects inserts to output file checked.
How to repeat:
1. Open some database with some inserts (output sql file in my case at least 220 lines).
2. File->Export->Forward Engineer SQL CREATE Script ...
4.
-Enter path to output file
-Check all checkboxes except Omit Schema Qualifier in Object Names, Generate USE statements, Do Not Create User.
-Continue
5. Dialog: click Replace if output file exists
6. Check export mysql table objects and Export user objects. Click continue
7. In preview and output file (e.g. in notepad) you will see nice sql script.
And now when you click Finish button, wizard cutes about 2.5 last lines from output file.
Suggested fix:
I don't know. Maybe some buffer in last step is overflowed.
In version 5.2.3 this process worked fine.