Bug #33668 Invalid table comments in SQL exports
Submitted: 3 Jan 2008 18:20 Modified: 3 Jan 2008 20:08
Reporter: Martin Mayer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.11 OSS Beta Rev 2360 OS:Windows (XP Pro)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: sql export

[3 Jan 2008 18:20] Martin Mayer
Description:
When exporting (Forward Engineer to SQL Script) table with comment, comment is not ended with apostrophe. This makes generated SQL invalid.

How to repeat:
Add table with column(s)
Add comment to table
Export (Menu File/Export/Forward Engineer to SQL Script...)

Generated output (see "COMMENT = 'My comment;"):
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 DATABASE IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 ;
USE `mydb`;

-- -----------------------------------------------------
-- Table `mydb`.`table1`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mydb`.`table1` (
  `idtable1`  NULL )
COMMENT = 'My comment;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
[3 Jan 2008 18:52] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[3 Jan 2008 18:58] Martin Mayer
Sorry, now I see it's already solved, this bug duplicates #33603
[3 Jan 2008 20:08] Michael G. Zinner
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html