Comment 5 for bug 337038

Revision history for this message
Padraig O'Sullivan (posulliv) wrote :

Ok, so now the behavior is as follows:

drizzle> use test
Database changed
drizzle> create table t1 (
    -> f1 decimal not null default 17.49,
    -> f2 decimal not null default 17.68,
    -> f3 decimal not null default 99.2,
    -> f4 decimal not null default 99.7,
    -> f5 decimal not null default 104.49,
    -> f6 decimal not null default 199.91,
    -> f7 decimal not null default 999.9,
    -> f8 decimal not null default 9999.99);
ERROR 1067 (42000): Invalid default value for 'f1'
drizzle> show warnings;
+---------+------+-----------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------+
| Warning | 1265 | Data truncated for column 'f1' at row 1 |
| Error | 1067 | Invalid default value for 'f1' |
+---------+------+-----------------------------------------+
2 rows in set (0.00 sec)

drizzle>

I've committed this change to the branch linked to this bug. What I'm working on now is cleaning up the test cases which this fix breaks so that might take a little bit of time. A lot of test cases just expect warnings here instead of errors in this scenario...much more than I expected!

-Padraig