diff options
Diffstat (limited to 'mysql-test/r/func_math.result')
-rw-r--r-- | mysql-test/r/func_math.result | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index ffd6d2fc5b2..cce6a4cbb3e 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -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; @@ -489,6 +501,54 @@ SHOW WARNINGS; Level Code Message Warning 1292 Truncated incorrect DECIMAL value: '' Error 1690 BIGINT value is out of range in '('123456789012345678901234567890.123456789012345678901234567890' DIV 1)' +# +# Bug#57810 case/when/then : Assertion failed: length || !scale +# +SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END; +CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END +NULL +CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `C` varchar(23) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR +# +CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL); +DROP TABLE t1; +CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL); +DROP TABLE t1; +# +# Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION +# +CREATE TABLE t1(f1 DECIMAL(22,1)); +INSERT INTO t1 VALUES (0),(1); +SELECT ROUND(f1, f1) FROM t1; +ROUND(f1, f1) +0.0 +1.0 +SELECT ROUND(f1, f1) FROM t1 GROUP BY 1; +ROUND(f1, f1) +0.0 +1.0 +DROP TABLE t1; +# +# Bug#11764671 57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA +# +SELECT ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a')); +ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a')) +-4939092.0000 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'a' +# +# Bug#12392636 ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION +# +SELECT SUM(DISTINCT (TRUNCATE((.1), NULL))); +SUM(DISTINCT (TRUNCATE((.1), NULL))) +NULL End of 5.1 tests # # Bug #8433: Overflow must be an error @@ -600,3 +660,42 @@ NULL SELECT -9223372036854775808 MOD -1; -9223372036854775808 MOD -1 0 +# +# Bug #57209 valgrind + Assertion failed: dst > buf +# +SELECT floor(log10(format(concat_ws(5445796E25, 5306463, 30837), -358821))) +as foo; +foo +2 +# +# Bug #58137 char(0) column cause: +# my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed +# +CREATE TABLE t1(a char(0)); +INSERT INTO t1 (SELECT -pi()); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +# +# Bug #59241 invalid memory read +# in do_div_mod with doubly assigned variables +# +SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa'))); +((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa'))) +NULL +Warnings: +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +# +# Bug #59498 div function broken in mysql-trunk +# +SELECT 1 div null; +1 div null +NULL +# +# Bug #11792200 - DIVIDING LARGE NUMBERS CAUSES STACK CORRUPTIONS +# +select (1.175494351E-37 div 1.7976931348623157E+308); +(1.175494351E-37 div 1.7976931348623157E+308) +0 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: '' |