Bug #8448 Precision math/Traditional: Too-long decimal value not rejected
| Submitted: | 11 Feb 2005 18:23 | Modified: | 8 Jun 2005 10:28 |
|---|---|---|---|
| Reporter: | Trudy Pelzer | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.3-alpha-debug | OS: | Linux (SuSE 9.1) |
| Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
[11 Feb 2005 18:23]
Trudy Pelzer
[11 Feb 2005 18:51]
Aleksey Kishkin
in windows I got little bit different results mysql> create table t1 (col1 decimal(38,38)); Query OK, 0 rows affected (0.05 sec) mysql> insert into t2 values(.12345678901234567890123456789012345678); ERROR 1146 (42S02): Table 'test.t2' doesn't exist mysql> insert into t1 values(.12345678901234567890123456789012345678); Query OK, 1 row affected (0.00 sec) mysql> show warnings; Empty set (0.00 sec) mysql> select * from t1; +----------------------------------+ | col1 | +----------------------------------+ | 0.123456789012345680000000000000 | +----------------------------------+ 1 row in set (0.02 sec)
[11 Feb 2005 19:05]
Trudy Pelzer
Sorry, cut and paste problem. The test case should be: mysql> set sql_mode=traditional; mysql> create table t1 (col1 decimal(38,38)); mysql> insert into t1 values(.12345678901234567890123456789012345678); mysql> show warnings; mysql> select * from t1;
[11 Feb 2005 19:34]
Trudy Pelzer
I was asleep at the wheel! There is no bug under Linux after all, since it is perfectly fine to round a number with too many post- decimal digits, and that is happening in my example. But Aleksey's result under Windows needs to be examined: if that is happening under Windows with the precision math patch pushed, then we're seeing an incorrect result. The server should do the same thing under both OSs.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.