Bug #8999 decimal/numeric fields ignore scale and precision
Submitted: 6 Mar 2005 17:59 Modified: 7 Mar 2005 6:23
Reporter: David Newcomb (OCA) Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.18 OS:
Assigned to: CPU Architecture:Any

[6 Mar 2005 17:59] David Newcomb
Scale part of the field only gose up to 99. Presision holds as long as scale does not exceed 99.

Problem exists on: 3.23.56 and 4.0.18-standard

How to repeat:
create table decimaltest
fnum NUMERIC(5,5) default '0',
fdec DECIMAL(5,5) default '0'

insert into decimaltest(fnum, fdec) values ('123.123','123.123');
select * from decimaltest;
drop table decimaltest;
[7 Mar 2005 6:23] Aleksey Kishkin
values you inserted are out of scale and you must get warnings when you insert them. 

according to documentation:
When a DECIMAL or NUMERIC column is assigned a value that exceeds the range implied by the specified (or default) precision and scale, MySQL stores the value representing the corresponding end point of that range.