id select_type table type possible_keys key key_len ref rows filtered Extra
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Warnings:
Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format(cot(1),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
select degrees(pi()),radians(360);
select degrees(pi()),radians(360);
degrees(pi()) radians(360)
degrees(pi()) radians(360)
180 6.283185307179586
180 6.283185307179586
...
@@ -451,23 +451,17 @@ SELECT 1 FROM (SELECT ROUND(f1, f1) AS a FROM t1) AS s WHERE a LIKE 'a';
...
@@ -451,23 +451,17 @@ SELECT 1 FROM (SELECT ROUND(f1, f1) AS a FROM t1) AS s WHERE a LIKE 'a';
DROP TABLE t1;
DROP TABLE t1;
End of 5.0 tests
End of 5.0 tests
SELECT 1e308 + 1e308;
SELECT 1e308 + 1e308;
1e308 + 1e308
ERROR 22003: DOUBLE value is out of range in '(1e308 + 1e308)'
NULL
SELECT -1e308 - 1e308;
SELECT -1e308 - 1e308;
-1e308 - 1e308
ERROR 22003: DOUBLE value is out of range in '(-(1e308) - 1e308)'
NULL
SELECT 1e300 * 1e300;
SELECT 1e300 * 1e300;
1e300 * 1e300
ERROR 22003: DOUBLE value is out of range in '(1e300 * 1e300)'
NULL
SELECT 1e300 / 1e-300;
SELECT 1e300 / 1e-300;
1e300 / 1e-300
ERROR 22003: DOUBLE value is out of range in '(1e300 / 1e-300)'
NULL
SELECT EXP(750);
SELECT EXP(750);
EXP(750)
ERROR 22003: DOUBLE value is out of range in 'exp(750)'
NULL
SELECT POW(10, 309);
SELECT POW(10, 309);
POW(10, 309)
ERROR 22003: DOUBLE value is out of range in 'pow(10,309)'
NULL
#
#
# Bug #44768: SIGFPE crash when selecting rand from a view
# Bug #44768: SIGFPE crash when selecting rand from a view
# containing null
# containing null
...
@@ -488,11 +482,121 @@ RAND(i)
...
@@ -488,11 +482,121 @@ RAND(i)
DROP TABLE t1;
DROP TABLE t1;
#
#
select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x;
select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x;
ERROR 22003: Out of range value for column 'x' at row 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;
ERROR 22003: Out of range value for column 'x' at row 1
ERROR 22003: BIGINT value is out of range in '('123456789012345678901234567890.123456789012345678901234567890' DIV 1)'
ERROR 22003: DECIMAL value is out of range in '(99999999999999999999999999999999999999999999999999999999999999999 * 99999999999999999999999999999999999999999999999999999999999999999)'