Bug #6067 non-numeric values inserted into year column results in value 2000
Submitted: 13 Oct 2004 18:22 Modified: 10 Feb 2005 20:14
Reporter: Reggie Burnett
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version:All OS:
Assigned to: Jim Winstead Target Version:

[13 Oct 2004 18:22] Reggie Burnett
Description:
the following will result in the value 2000 being inserted into the table.

create table Test (yr YEAR);

insert into test values ('abc');

How to repeat:
follow the steps above
[13 Oct 2004 20:42] Matthew Lord
I was able to repeat this on windows 2000 SMP and RH 9 Linux (Linux booty 2.4.21 #12 SMP
Thu 
Aug 14 00:49:40 EDT 2003 i686 i686 i386 GNU/Linux).

The column's default is NULL so it should get NULL.
[2 Feb 2005 0:22] Jim Winstead
Will default to '0000', as we do for similar cases setting a numeric field to a
non-numeric string.
[4 Feb 2005 22:00] Jim Winstead
Fixed in 4.1 tree.
[10 Feb 2005 20:14] Paul DuBois
Mentioned in 4.1.10 change notes.