Bug #60774 | WB generates "Error 1064: You have an error in your SQL syntax" | ||
---|---|---|---|
Submitted: | 6 Apr 2011 10:49 | Modified: | 9 Jan 2015 16:16 |
Reporter: | Stuart Hendrick | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S3 (Non-critical) |
Version: | 5.2.33 (MySQL Server version 5.5.9) | OS: | Windows (W7 64-bit) |
Assigned to: | CPU Architecture: | Any | |
Tags: | 1064, comment, forward engineer |
[6 Apr 2011 10:49]
Stuart Hendrick
[6 Apr 2011 11:26]
Valeriy Kravchuk
Please, send the problematic .mwb file and provide the exact server version, 5.x.y, used. I've got the code you described (extra comma before COMMENT for second table): 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 ; USE `mydb` ; -- ----------------------------------------------------- -- Table `mydb`.`table1` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`table1` ( `idtable1` INT NOT NULL , `c1` VARCHAR(45) NULL , PRIMARY KEY (`idtable1`) ) ENGINE = InnoDB COMMENT = 'this is a long long comment like this 1234567890 1234567890 ' /* comment truncated */ ; -- ----------------------------------------------------- -- Table `mydb`.`table2` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`table2` ( `idtable2` INT NOT NULL , `c1` VARCHAR(45) NULL , PRIMARY KEY (`idtable2`) ) ENGINE = InnoDB, COMMENT = 'this is another long long comment like this 1234567890 12345' /* comment truncated */ ; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; But this script executed successfully on both 5.0.91 and 5.5.10. I think the problem may be related to the exact comment text in your case.
[6 Apr 2011 11:37]
Stuart Hendrick
MySQL Server version 5.5.9
[6 Apr 2011 12:21]
MySQL Verification Team
Thank you for the feedback.