From aef97cadfaf1ea9947fd9f5dbedae6842412ddef Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Thu, 18 Mar 2010 13:38:29 +0300 Subject: 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". --- mysql-test/t/func_misc.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/func_misc.test') diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 6590b43f2dc..43cc6de6649 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -22,7 +22,7 @@ select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_ut # between two calls should be -1 set @a= uuid_short(); set @b= uuid_short(); -select cast(@a - @b as signed); +select @b - @a; # # Test for core dump with nan -- cgit v1.2.1