On 8/13/08, Giuseppe Maxia <[EMAIL PROTECTED]> wrote:
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)
Ahhh...it took me a while to realize why this was a crappy error message.
For the benefit of the list, I'll put my thoughts here, though maybe
everyone else isn't as thick as I am...
Basically when the data is NOT inserted, it shouldn't tell me the data was
truncated. (that message should no longer exist, data is either put into
the database as the user specified, or not put in). It should be changed to
"Failure due to type mismatch with column 'field1' at row 1" or somesuch.
Something that means "I couldn't insert the row because the data doesn't
meet the requirements".
-Sheeri
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp