1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #8433: Overflow must be an error

All numeric operators and functions on integer, floating point 
and DECIMAL values now throw an 'out of range' error rather 
than returning an incorrect value or NULL,  when the result is 
out of supported range for the corresponding data type. 
 
Some test cases in the test suite had to be updated 
accordingly either because the test case itself relied on a 
value returned in case of a numeric overflow, or because a 
numeric overflow was the root cause of the corresponding bugs. 
The latter tests are no longer relevant, since the expressions 
used to trigger the corresponding bugs are not valid anymore. 
However, such test cases have been adjusted and kept "for the 
record".
This commit is contained in:
Alexey Kopytov
2010-03-18 13:38:29 +03:00
parent 7c10a8981c
commit aef97cadfa
20 changed files with 640 additions and 125 deletions

View File

@ -25,9 +25,9 @@ length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8'')))
36 utf8 16
set @a= uuid_short();
set @b= uuid_short();
select cast(@a - @b as signed);
cast(@a - @b as signed)
-1
select @b - @a;
@b - @a
1
select length(format('nan', 2)) > 0;
length(format('nan', 2)) > 0
1