Bug #23079 | CHAR shows as CHAR(0) in SQL create script | ||
---|---|---|---|
Submitted: | 7 Oct 2006 21:46 | Modified: | 10 Oct 2006 23:18 |
Reporter: | Matthew Williams | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Workbench Preview | Severity: | S3 (Non-critical) |
Version: | 1.1.3 alpha | OS: | Windows (XP Home SP2) |
Assigned to: | CPU Architecture: | Any | |
Tags: | char, create script |
[7 Oct 2006 21:46]
Matthew Williams
[9 Oct 2006 23:22]
MySQL Verification Team
Thank you for the bug report. I was unable to repeat with version 1.1.3: -- ---------------------------------------------------------------------- -- MySQL GRT Application -- SQL Script -- ---------------------------------------------------------------------- SET FOREIGN_KEY_CHECKS = 0; CREATE DATABASE IF NOT EXISTS `test` CHARACTER SET latin1; -- ------------------------------------- -- Tables DROP TABLE IF EXISTS `test`.`table_01`; CREATE TABLE `test`.`table_01` ( `idtable_01` CHAR(20) CHARACTER SET COLLATE UNSIGNED NOT NULL, PRIMARY KEY (`idtable_01`) ) ENGINE = InnoDB CHARACTER SET latin1 COLLATE latin1_swedish_ci; SET FOREIGN_KEY_CHECKS = 1; -- ---------------------------------------------------------------------- -- EOF
[10 Oct 2006 23:18]
Matthew Williams
Clarification: only occurs when you use “CHAR” with no parentheses “(x)” afterwards. This would be equivalent to saying “CHAR(1)” but it is a valid statement in MySQL to say “`id_table1` CHAR NOT NULL` without including the “(1)”.