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.