mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix CAST(1.0e+300 TO SIGNED). (Bug #13344)
mysql-test/r/cast.result: Update results mysql-test/t/cast.test: Add regression test sql/item.h: Cap Item_real::val_int() to LONGLONG_MIN and LONGLONG_MAX.
This commit is contained in:
@ -252,3 +252,6 @@ cast(repeat('1',20) as signed)
|
||||
-7335632962598440505
|
||||
Warnings:
|
||||
Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement
|
||||
select cast(1.0e+300 as signed int);
|
||||
cast(1.0e+300 as signed int)
|
||||
9223372036854775807
|
||||
|
@ -143,4 +143,9 @@ select cast(concat('184467440','73709551615') as signed);
|
||||
select cast(repeat('1',20) as unsigned);
|
||||
select cast(repeat('1',20) as signed);
|
||||
|
||||
#
|
||||
# Bug #13344: cast of large decimal to signed int not handled correctly
|
||||
#
|
||||
select cast(1.0e+300 as signed int);
|
||||
|
||||
# End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user