Bug #15711 Create new table failed when engine & comment is specified.

Submitted: 13 Dec 2005 13:50 Modified: 14 Dec 2005 11:08
Reporter: Az Erty Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.17 OS:Windows (WinXP SP2)
Assigned to: Aleksey Kishkin CPU Architecture:Any

[13 Dec 2005 13:50] Az Erty
Description:
Just built my table with table editor, when clicking apply change, here's the syntax proposed (which fails):

just another table creation that failed when using table editor

---
CREATE TABLE `database`.`table` (
`pkey` INT(8) UNSIGNED NOT NULL DEFAULT 0,
`afield` VARCHAR(40) DEFAULT '',
PRIMARY KEY(`pkey`),
INDEX `Index`(`afield`)
)
ENGINE = MYISAM
COMMENT = 'some comments';
---

I just removed the engine line (and mysql used the default one), but I presume that a comma would have do the trick aswell...

###

As there's no feature request part, I just add it here too:
A selection of the available types (with options that apply for this type)
would be great.

ex. INT -> select length / DEFAULT / etc...

How to repeat:
just create the table using editor w/ 2 fields and select the engine type & comment.

Suggested fix:
add a coma (after ENGINE) when generating SQL ?!?
[14 Dec 2005 11:08] Aleksey Kishkin
Actually there is no need comma after myisam. I tested your example, got

CREATE TABLE `test`.`tbl` (
  `pkey` INT(8) UNSIGNED NOT NULL DEFAULT 0,
  `afield` VARCHAR(45) NOT NULL DEFAULT '',
  PRIMARY KEY(`pkey`),
  INDEX `Index_2`(`afield`)
)
ENGINE = MYISAM
COMMENT = 'some comment';

And it worked fine (without any errors or warnings) on my computer.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.