diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-03-15 14:11:30 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-03-15 14:12:05 +0400 |
commit | b6dc47a0f72fb56b4e7e916dbf8df861949253e0 (patch) | |
tree | 39f2c4456f6cf41a2cea71bf96e5313c596968ed /mysql-test/t | |
parent | 34db9958e28c325b0f708f78b7ff029de810d5ea (diff) | |
download | mariadb-git-b6dc47a0f72fb56b4e7e916dbf8df861949253e0.tar.gz |
MDEV-17643 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/func_math.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 8cacb4c575a..4c2d7921593 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -599,3 +599,36 @@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table; --echo # --echo # End of 10.0 tests --echo # + + +--echo # +--echo # Start of 10.1 tests +--echo # + +--echo # +--echo # MDEV-17643 Assertion `nr >= 0.0' failed in Item_sum_std::val_real() +--echo # + +CREATE TABLE t1 ( pk int NOT NULL, i1 int NOT NULL, d1 date NOT NULL, t1 time); +INSERT INTO t1 VALUES (7,9,'2007-08-15','03:55:02'),(8,7,'1993-06-05','04:17:51'),(9,7,'2034-07-01','17:31:12'),(10,0,'1998-08-24','08:09:27'); +SELECT DISTINCT STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1)))) FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(128)); +INSERT INTO t1 VALUES ('1e310'); +INSERT INTO t1 VALUES ('-1e310'); +INSERT INTO t1 VALUES ('0'); +SELECT STDDEV_SAMP(a) FROM t1; +DROP TABLE t1; + +CREATE OR REPLACE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (1.7e+308); +INSERT INTO t1 VALUES (-1.7e+308); +INSERT INTO t1 VALUES (0); +SELECT STDDEV_SAMP(a) FROM t1; +DROP TABLE t1; + + +--echo # +--echo # End of 10.1 tests +--echo # |