mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Merge mysql.com:/usr/home/bar/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.1-new mysql-test/r/cast.result: Auto merged sql/field.cc: Auto merged
This commit is contained in:
commit
8cf93ac629
3 changed files with 22 additions and 0 deletions
|
|
@ -337,6 +337,14 @@ Warning 1105 Cast to signed converted positive out-of-range integer to it's nega
|
|||
select cast(1.0e+300 as signed int);
|
||||
cast(1.0e+300 as signed int)
|
||||
9223372036854775807
|
||||
CREATE TABLE t1 (f1 double);
|
||||
INSERT INTO t1 SET f1 = -1.0e+30 ;
|
||||
INSERT INTO t1 SET f1 = +1.0e+30 ;
|
||||
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
|
||||
DROP TABLE t1;
|
||||
select cast('1.2' as decimal(3,2));
|
||||
cast('1.2' as decimal(3,2))
|
||||
1.20
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue