Description:
If your MySQL script starts with an empty line (not a comment, but a true newline),
importing of the ERR diagram from it is broken: you get zero tables, zero foreign keys, zero procedures.
The bug appears at least in the following versions:
* 5.2.37 on MacOSX 10.6
* 5.2.38 on Ubuntu 12.04
* 5.2.40 on MacOSX 10.6
(so it doesn't seem to be OS-dependent)
Why I believe it is a bug and not a feature:
(1) The same script works in mysql client and produces results (creates tables, foreign keys, procedures...), so the inability to parse is a specific property of the Workbench.
(2) It is not documented ("don't start your script with an empty line if you don't want it to be ignored by Workbench")
(3) The ignoring of the rest of the script is completely silent. You don't get any warnings like "Your script starts with a newline - ignoring the rest".
It just ignores the whole script, which I believe it shouldn't. I believe it is serious, because there is nothing to let the user know what is going on.
How to repeat:
1) Try to create an ERR diagram from the following file:
----------------------->cut here<-----------------
# this will work
CREATE TABLE IF NOT EXISTS meta (
meta_id INT NOT NULL AUTO_INCREMENT
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
----------------------->cut here<-----------------
(2) Now try to create an ERR diagram from the following one:
----------------------->cut here<-----------------
# this will NOT work
CREATE TABLE IF NOT EXISTS meta (
meta_id INT NOT NULL AUTO_INCREMENT
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
----------------------->cut here<-----------------
I see no objects imported or placed on the diagram.
Suggested fix:
I'm not a developer of the Workbench, but would first look at the parser, check whether the parser expects a non-empty first line, or has some weird file-loading loop whose condition makes it exit if your first line has zero length or similar. Improvise :)