Bug #29215 CAST('1.01' as DECIMAL) returns 1
Submitted: 19 Jun 2007 15:13 Modified: 20 Jun 2007 9:23
Reporter: Christian Weiske Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Data Types Severity:S2 (Serious)
Version:5.0.42 OS:Any
Assigned to: CPU Architecture:Any

[19 Jun 2007 15:13] Christian Weiske
Description:
On gentoo's mysql-5.0.42-log the following query returns "1" instead of the expected 1.01:

SELECT CAST( "1.01" AS DECIMAL )

It does work in 5.0.38, 5.0.40 and 5.0.32-Debian_7etch1-log.

How to repeat:
SELECT CAST( "1.01" AS DECIMAL )
[20 Jun 2007 9:23] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please read carefully about DECIMAL data type at http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html