Commit ea554378 authored by Sergey Glukhov's avatar Sergey Glukhov

5.1-secutity->5.5-security merge(test case only)

parents dcc39770 378f0378
......@@ -481,6 +481,18 @@ RAND(i)
0.15522042769493574
DROP TABLE t1;
#
# Bug#57477 SIGFPE when dividing a huge number a negative number
#
SELECT -9999999999999999991 DIV -1;
ERROR 22003: BIGINT value is out of range in '(-(9999999999999999991) DIV -(1))'
SELECT -9223372036854775808 DIV -1;
ERROR 22003: BIGINT value is out of range in '(-(9223372036854775808) DIV -(1))'
SELECT -9223372036854775808 MOD -1;
-9223372036854775808 MOD -1
0
SELECT -9223372036854775808999 MOD -1;
-9223372036854775808999 MOD -1
0
select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x;
ERROR 22003: BIGINT value is out of range in '(123456789012345678901234567890.123456789012345678901234567890 DIV 1)'
select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x;
......
......@@ -316,6 +316,14 @@ SELECT RAND(i) FROM t1;
DROP TABLE t1;
--echo #
--echo # Bug#57477 SIGFPE when dividing a huge number a negative number
--echo #
--error ER_DATA_OUT_OF_RANGE
SELECT -9999999999999999991 DIV -1;
--error ER_DATA_OUT_OF_RANGE
SELECT -9223372036854775808 DIV -1;
SELECT -9223372036854775808 MOD -1;
SELECT -9223372036854775808999 MOD -1;
#
# Bug #8457: Precision math:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment