mirror of
https://github.com/MariaDB/server.git
synced 2025-08-30 11:22:14 +03:00
Fixed bug #22129: A small double precision number becomes zero
Better checks for underflow/overflow
This commit is contained in:
@@ -272,3 +272,10 @@ desc t3;
|
||||
Field Type Null Key Default Extra
|
||||
a double 0
|
||||
drop table t1,t2,t3;
|
||||
select 1e-308, 1.00000001e-300, 100000000e-300;
|
||||
1e-308 1.00000001e-300 100000000e-300
|
||||
0 1.00000001e-300 1e-292
|
||||
select 10e307;
|
||||
10e307
|
||||
1e+308
|
||||
End of 4.1 tests
|
||||
|
@@ -179,4 +179,13 @@ show warnings;
|
||||
desc t3;
|
||||
drop table t1,t2,t3;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
# Bug #22129: A small double precision number becomes zero
|
||||
#
|
||||
# check if underflows are detected correctly
|
||||
select 1e-308, 1.00000001e-300, 100000000e-300;
|
||||
|
||||
# check if overflows are detected correctly
|
||||
select 10e307;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user