Bug #52259 Can't set datatype of certain columns to the type ENUM()
Submitted: 21 Mar 2010 16:49 Modified: 23 Mar 2010 23:00
Reporter: Pascal Bakhuis Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:stable version as well as 5.2.16 OS:Any
Assigned to: CPU Architecture:Any

[21 Mar 2010 16:49] Pascal Bakhuis
Description:
I am unable to set the datatype of certain columns to the datatype ENUM().

I tried to both manually enter the value ENUM() as well as selection it from the dropdown menu but it will reset itself to what it was previously set to.

Just to make sure you have all the information needed, this diagram was originally created in dbdesigner 4, then imported to the stable version of MySQL Workbench so perhaps it's related to that.

How to repeat:
Get the diagram that I can hopefully attach in a comment, if not I'll see about posting a link to it. Either way.. obtain the diagram.

Select the table Episode, then try settings its initial_release_medium_enum column to the type ENUM().  It will automatically fall back to the type VARCHAR(45).
[21 Mar 2010 16:51] Pascal Bakhuis
File that wont let the enum be set on the episode table

Attachment: EER.mwb (application/octet-stream, text), 12.76 KiB.

[22 Mar 2010 21:23] Johannes Taxacher
Hi Pascal,

did you specify enum values between the brackets? WB wont allow you to specify a column as ENUM without actually defining the values. i.e.: ENUM ('red','green','blue')
[22 Mar 2010 22:10] Pascal Bakhuis
It seems I did not.

It would be nice if some kind of visual feedback could be given to indicate exactly what is going on.
A warning message like "The ENUM() type must contain values (for example ENUM('1','2')" in the statusbar would an easy and effective solution.
[23 Mar 2010 0:16] MySQL Verification Team
enum column

Attachment: enum.png (image/png, text), 35.65 KiB.

[23 Mar 2010 0:16] MySQL Verification Team
Thank you for the bug report. Please see prior attached picture. Thanks in advance.
[23 Mar 2010 22:58] Pascal Bakhuis
Suggestion to give visual feedback when there is a problem with the datatype.

Attachment: suggestion.png (image/png, text), 42.19 KiB.

[23 Mar 2010 23:00] Pascal Bakhuis
I understood what you were saying (and successfully set the ENUM). You however seemed to have overlooked that I was suggesting to let the program give some kind of clue to the user as to why the datatype was ignored.

Please see the screenshot above for one way to provide this information to the user. (text on the bottomleft)