Commit dff3f05b authored by Sergey Glukhov's avatar Sergey Glukhov

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

parents 7334d96e 5bf148fc
...@@ -481,6 +481,18 @@ RAND(i) ...@@ -481,6 +481,18 @@ RAND(i)
0.15522042769493574 0.15522042769493574
DROP TABLE t1; 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; select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x;
ERROR 22003: BIGINT value is out of range in '(123456789012345678901234567890.123456789012345678901234567890 DIV 1)' ERROR 22003: BIGINT value is out of range in '(123456789012345678901234567890.123456789012345678901234567890 DIV 1)'
select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x; select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x;
......
...@@ -316,6 +316,14 @@ SELECT RAND(i) FROM t1; ...@@ -316,6 +316,14 @@ SELECT RAND(i) FROM t1;
DROP TABLE t1; DROP TABLE t1;
--echo # --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: # 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