List:Commits« Previous MessageNext Message »
From:Peter Gulutzan Date:May 26 2009 9:04pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)
Bug#33717
View as plain text  
Hi Sergei,

Sergei Golubchik wrote:
> Hi, Peter!
>
> On May 22, Peter Gulutzan wrote:
>   
>> Sergei Golubchik wrote:
>>     
>>> 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?
>>     
>
> In the strict mode - yes, an error. In the non-strict - a warning "no
> default" and the first enumeration value is used as a default. For
> example:
>
>   mysql> create table tt1 (a int not null, b enum('a','b') not null);
>   Query OK, 0 rows affected (0.04 sec)
>
>   mysql> insert tt1 values ();
>   Query OK, 1 row affected, 1 warning (0.00 sec)
>   Warning (Code 1364): Field 'a' doesn't have a default value
>
> This shows that ENUM behaves differently from INT.
>  
>   
>> Sure. But it's a change in documented user-visible
>> behaviour, so it's supposed to have a worklog.
>>     
>
> What do you mean by "sure" ? "sure it's possible" ? Or "sure, I prefer
> it to be done instead of what I suggested earlier (taking into account
> the 'but')" ?
>
> I know that it's possible, it wasn't what I asked. I asked whether you
> would prefer the "special" (different from other types) behavior of ENUM
> to be removed instead of fixing the code to follow the manual ?
>   

"Sure" means sure in reply to your question. That is,
"sure, fix ENUM to be more like other types (and change
the manual, of course)".

I don't think you're disagreeing with my next sentence

"But it's a change in documented user-visible
behaviour, so it's supposed to have a worklog."
Judging from the deprecation guidelines

https://inside.mysql.com/wiki/DeprecatingServerFeatures

and the worklog guidelines
https://inside.mysql.com/wiki/GuidelinesForWritingAndMaintainingaWorklogEntry

I expect that this way requires more time and effort.

-- 

Peter Gulutzan
Database Group / MySQL www.mysql.com
Sun Microsystems of Canada Inc.
Edmonton, AB, Canada

Thread
bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Sergey Glukhov27 Feb 2009
  • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Sergei Golubchik26 Mar 2009
    • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Sergey Glukhov19 May 2009
      • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Peter Gulutzan22 May 2009
        • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Sergei Golubchik22 May 2009
          • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Peter Gulutzan22 May 2009
            • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Sergei Golubchik22 May 2009
              • Re: bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2828)Bug#33717Peter Gulutzan26 May 2009