Bug #34668 workbench creates duplicate CREATE statements for tables in exported SQL
Submitted: 19 Feb 2008 16:00 Modified: 25 Feb 2008 19:44
Reporter: Johannes Taxacher Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.13 beta svn 2576 OS:Windows
Assigned to: Johannes Taxacher CPU Architecture:Any

[19 Feb 2008 16:00] Johannes Taxacher
Description:
I managed to create a workbench-file that holds two tables (table1 in schema mydb and table2 in schema new_schema1) where CREATE for mydb.table1 is written twice when exporting SQL CREATE script.
It doesn't do harm to the exported script because its legal SQL, but it's not expected.

How to repeat:
- load attached model file
- choose file->export->Forward Engineer SQL CREATE Script
- select a filename and finish the wizard.

the created export-file contains:

...
-- -----------------------------------------------------
-- Table `mydb`.`table1`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mydb`.`table1` (
  `idtable1` INT NOT NULL ,
  PRIMARY KEY (`idtable1`) );

CREATE SCHEMA IF NOT EXISTS `new_schema1` ;
USE `new_schema1`;

-- -----------------------------------------------------
-- Table `mydb`.`table1`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mydb`.`table1` (
  `idtable1` INT NOT NULL ,
  PRIMARY KEY (`idtable1`) );
...
[19 Feb 2008 16:01] Johannes Taxacher
Workbench-document which creates unneccessary output in SQL script

Attachment: export_table_duplicate.mwb (application/octet-stream, text), 4.50 KiB.

[22 Feb 2008 17:29] Johannes Taxacher
fixed in 5.0.14
[25 Feb 2008 19:44] Peter Lavin
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
Added to the changelog.
[25 Feb 2008 19:46] Peter Lavin
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
Added to the changelog.