Hi Sergei,
Sergei Golubchik wrote:
> Hi, Peter!
>
> What about instead of trying to follow exactly what manual says, we
> instead fix ENUM to be more like other types (and change the manual, of
> course) ?
>
>
Do you mean:
If column_name is defined with ENUM and NOT NULL,
and without a DEFAULT clause, then the default is
no longer the first enumeration value?
Sure. But it's a change in documented user-visible
behaviour, so it's supposed to have a worklog.
/Peter
> On May 21, Peter Gulutzan wrote:
>
>> Sergey Glukhov wrote:
>>
>>> Could you comment this ENUM field vagueness(see below)?
>>>
>>> Which way would you recommend? or maybe you have another idea about
>>> this?
>>>
>> 1. Remove "Field .... doesn't have a default value" warning/error.
>>
> ...
>
>> What about strict mode?
>> The manual says a variety of things.
>>
> ...
>
>> So I suggest:
>> * The remarks about "implicit" do not apply for this case,
>> it was not anticipated. It is in any case difficult for
>> users to notice whether a default is implicit or explicit.
>> * The assignment of DEFAULT to an ENUM is okay in strict mode,
>> because there's always an implicit default.
>> * The assignment of NULL to an ENUM is okay in strict mode,
>> even for a NOT NULL column, because we treat it like DEFAULT.
>>
>
> Regards / Mit vielen Grüßen,
> Sergei
>
>
--
Peter Gulutzan
Database Group / MySQL www.mysql.com
Sun Microsystems of Canada Inc.
Edmonton, AB, Canada