Bug #51416 | Export function creates multiple semicolons for views | ||
---|---|---|---|
Submitted: | 23 Feb 2010 10:53 | Modified: | 26 Mar 2010 16:19 |
Reporter: | Kai Sautter (Basic Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
Version: | 5.1.18a, 5.2.16 | OS: | Any |
Assigned to: | Alexander Musienko | CPU Architecture: | Any |
Tags: | qc |
[23 Feb 2010 10:53]
Kai Sautter
[23 Feb 2010 11:19]
Valeriy Kravchuk
Thank you for the bug report. Verified just as described. The following cocde is generated by WB 5.2.16: SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; -- ----------------------------------------------------- -- Table `mydb`.`table1` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`table1` ( `idtable1` INT NOT NULL , `c1` VARCHAR(45) NULL , PRIMARY KEY (`idtable1`) ) ENGINE = InnoDB; -- ----------------------------------------------------- -- Placeholder table for view `mydb`.`view1` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`view1` (`idtable1` INT, `c1` INT); -- ----------------------------------------------------- -- View `mydb`.`view1` -- ----------------------------------------------------- DROP TABLE IF EXISTS `mydb`.`view1`; CREATE OR REPLACE VIEW `mydb`.`view1` AS select * from table1; ; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
[23 Mar 2010 14:11]
Johannes Taxacher
fixed in repository
[26 Mar 2010 16:19]
Tony Bedford
An entry has been added to the 5.2.17 changelog: When a model with a view was exported using File, Export, Forward Engineer SQL CREATE Script, a semi-colon was added to the end of the CREATE VIEW statement, even if one was already present from the view code entered.