Bug #57110 Table comment length is not restricted in workbench
Submitted: 29 Sep 2010 17:01 Modified: 15 Oct 2010 19:52
Reporter: Marc Ford Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.28 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: comments

[29 Sep 2010 17:01] Marc Ford
Description:
Users can add a comment to their tables (or columns).  If the user enters a long comment, when they synchronize to an actual schema, they get an error. 

How to repeat:
Enter long comment and synch the schema.  You should get an error like this...

Executing SQL script in server
ERROR: Error 1105: Too long comment for table 'vc_info_event_unique_def'

CREATE  TABLE IF NOT EXISTS `qualifier_workbench`.`vc_info_event_unique_def` (
  `id_unique_def` INT(11) NOT NULL AUTO_INCREMENT ,
  `id_event` INT(10) UNSIGNED NOT NULL ,
  `parameter_name` VARCHAR(64) NULL DEFAULT NULL ,
  `active_flag` TINYINT(4) NOT NULL DEFAULT 1 COMMENT '1 is active. 0 is inactive' ,
  `updated_by` INT(11) NULL DEFAULT NULL ,
  `updated_ts` TIMESTAMP NULL DEFAULT NULL ,
  `comment` VARCHAR(128) NULL DEFAULT NULL ,
  PRIMARY KEY (`id_unique_def`) ,
  INDEX `fk_vc_info_event_unique_def_vc_info_event1` (`id_event` ASC) ,
  INDEX `fk_vc_info_event_unique_def_vc_info_parameter1` (`parameter_name` ASC) ,
  INDEX `fk_vc_info_event_unique_def_vc_info_can1` (`parameter_name` ASC) ,
  CONSTRAINT `fk_vc_info_event_unique_def_vc_info_event1`
    FOREIGN KEY (`id_event` )
    REFERENCES `qualifier_workbench`.`vc_info_event` (`id_event` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_vc_info_event_unique_def_vc_info_parameter1`
    FOREIGN KEY (`parameter_name` )
    REFERENCES `qualifier_workbench`.`vc_info_parameter` (`parameter_name` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_vc_info_event_unique_def_vc_info_can1`
    FOREIGN KEY (`parameter_name` )
    REFERENCES `qualifier_workbench`.`vc_info_can` (`parameter_name` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = 'parameters that need to be handled in a unique manner by parse are entered here, and reference a specific event'

Suggested fix:
Restrict the field in the Workbench modeler to the number of characters mysql database supports.
[29 Sep 2010 17:56] MySQL Verification Team
Thank you for the bug report. Verified on Windows.
[15 Oct 2010 19:52] Johannes Taxacher
this is a duplicate of Bug #38597