Can't create ENUM('html','text','cms') ... Heidi makes Columntype TEXT ?

[expired user #8323]'s profile image [expired user #8323] posted 10 years ago in General Permalink
Hello !

When i make a sample table with follow command:

CREATE TABLE `Test` (`aenum` ENUM('html','text','cms') NOT NULL DEFAULT 'text') COLLATE='latin1_swedish_ci' ENGINE=MyISAM;

Then Heide makes the column "aenum" type toi "TEXT" ?
Change does not work either.

On console a:

ALTER TABLE `Test` CHANGE COLUMN `aenum` `aenum` ENUM('html','text','cms') NOT NULL DEFAULT 'text';

is working. ?


My colleague has version 6, since it still works.



...Mhhhh
jfalch's profile image jfalch posted 10 years ago Permalink
what version of heidisql are you using ?
[expired user #8323]'s profile image [expired user #8323] posted 10 years ago Permalink
Sorry i forgot... Version 8.3.0.4814 the newest...
ansgar's profile image ansgar posted 10 years ago Permalink
Oh, I can confirm that. Will check that. Must have been introduced with the latest changes for PostgreSQL data types.
[expired user #8323]'s profile image [expired user #8323] posted 10 years ago Permalink
Not so bad! It is a great program !!!
ansgar's profile image ansgar posted 10 years ago Permalink
I think the DEFAULT 'text' column makes HeidiSQL detect that column as TEXT type. ENUM columns with a different default value do not have this problem.
Code modification/commit from ansgar.becker, 10 years ago, revision 8.3.0.4815
Restrict regular expression in TDBConnection.GetDatatypeByName to very left characters, so it does not detect "ENUM('text','...') DEFAULT 'text'" columns as TEXT type. See http://www.heidisql.com/forum.php?t=16271
ansgar's profile image ansgar posted 10 years ago Permalink
Fixed in r4815.

Interesting bug. Should also have raised on an
ENUM('int','...')
or
ENUM('varchar','...')

Please login to leave a reply, or register at first.