On Thu, Aug 14, 2008 at 1:28 AM, Brian Aker <[EMAIL PROTECTED]> wrote:
> Hi!
>
> On Aug 13, 2008, at 4:00 PM, Brian Moon wrote:
>
>> So, in non-strict mode (drizzle gonna have more than one mode?), we get a
>> field inserted with an empty value. Not the default value?!?! IMO, it
>> should either fail on insert/update or should use the default value. Using
>> a value that is not part of the allowed values seems crazy to me.
>
> I believe that I fixed this early on, but I could be wrong.
>
> In drizzle if you insert/update an enum which is not null, a failure should
> occur (and if not, it is a bug).
>
> Cheers,
> -Brian
>
It fails, as it should. But with the same crappy error message.
drizzle>> create table test (field1 enum('val1', 'val2') not null
default 'val1');
Query OK, 0 rows affected (0.13 sec)
drizzle>> insert into test set field1='val3';
ERROR 1265 (01000): Data truncated for column 'field1' at row 1
drizzle>> select * from test;
Empty set (0.00 sec)
Giuseppe
--
The Data Charmer
http://datacharmer.org/
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp