Bug #13557 | select 0.00 as fd_name,... return a char instead a float | ||
---|---|---|---|
Submitted: | 28 Sep 2005 9:39 | Modified: | 21 May 2006 9:39 |
Reporter: | Marino Crescimanno | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.13rc | OS: | Windows (WinXP) |
Assigned to: | CPU Architecture: | Any |
[28 Sep 2005 9:39]
Marino Crescimanno
[28 Sep 2005 9:54]
Vasily Kishkin
Thanks for the bug report. I was able to reproduce the bug: mysql> select 0.01 as float_value_must_be from tl; +---------------------+ | float_value_must_be | +---------------------+ | 0.01 | +---------------------+ 1 row in set (0.00 sec) mysql> select 0 as int_value_must_be from tl; +-------------------+ | int_value_must_be | +-------------------+ | 0 | +-------------------+ 1 row in set (0.00 sec)
[30 Sep 2005 18:00]
Sergei Golubchik
What do you mean "return fd_name as char type" ? It returns the value as decimal type. (more precisely, MYSQL_TYPE_NEWDECIMAL)
[1 Nov 2005 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[21 May 2006 9:39]
Valeriy Kravchuk
0.00 is returned as DECIMAL(3,2), just as expected. Please, check with a newer version, 5.0.21: CREATE VIEW v1 AS SELECT 0.00 decimal_field; DESC v1;