Bug #51427 'Import Reverse Engineer MySQL Create Script' creates 2 undeleteable schemas
Submitted: 23 Feb 2010 16:31 Modified: 23 Feb 2010 18:51
Reporter: Cynthia Higginbotham Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.16 OS:Windows (rev 5249)
Assigned to: CPU Architecture:Any

[23 Feb 2010 16:31] Cynthia Higginbotham
Description:
Importing an SQL Create script creates another schema in addition to the default 'mydb' schema. When you try to Export a Forward Engineered SQL Create Script, the generated MySQL script has a spurious "CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;" in addition to the create commands for your specified database schema. This has to be removed by hand-editing.

In addition, neither the spurious default 'mydb' schema nor the imported schema can be deleted from the model--the 'delete' option is inactive.

How to repeat:
1. File | New Model

2. File | Import | Reverse Engineer MySQL Create Script...
   (Note: imported script does not have any mention of 'mydb', neither CREATE nor DROP)

3. Model now has two database schemas, 'mydb' and the imported one. None of the right-click context menu options will be active.

4. Database | Forward Engineer (or File | Export | Forward Engineer SQL CREATE script) will create a script with an unwanted "CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;" 

Suggested fix:
1. Any and all schemas should be deleteable.
2. Only selected schemas should be exported.
[23 Feb 2010 18:51] Johannes Taxacher
this is a duplicate of Bug #48055

as workaround, please use the [-] button on the right side of the header bar "physical schema" to delete the currently selected schema.