1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Additional 5.0 fix for

Bug#15098: CAST(column double TO signed int), wrong result
which was fixed originally in 4.1.


mysql-test/r/cast.result:
  Fixing test results
sql/field.cc:
  Adding a "truncated value" warning.
This commit is contained in:
unknown
2006-03-29 19:31:16 +05:00
parent dfe5769a04
commit fa65771ed8
2 changed files with 24 additions and 2 deletions

View File

@ -344,6 +344,9 @@ SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
double_val cast_val
-1e+30 -9223372036854775808
1e+30 9223372036854775807
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
Warning 1292 Truncated incorrect INTEGER value: '1e+30'
DROP TABLE t1;
select cast('1.2' as decimal(3,2));
cast('1.2' as decimal(3,2))