[Commits] bf402941170: Merge remote-tracking branch 'origin/10.1' into 10.2
revision-id: bf4029411706f3c684d0990cb0133481a9a9e578 (mariadb-10.2.22-75-gbf402941170) parent(s): 1f020299f816263e347c852eb2a494b5ef1cbf0d 6c08174e365c1a2db76e51dedd2a8292464472d6 author: Jan Lindström committer: Jan Lindström timestamp: 2019-03-16 08:30:47 +0200 message: Merge remote-tracking branch 'origin/10.1' into 10.2 mysql-test/mysql-test-run.pl | 2 -- mysql-test/r/func_math.result | 40 ++++++++++++++++++++++++++++++++++++++++ mysql-test/t/func_math.test | 27 +++++++++++++++++++++++++++ sql/item_sum.cc | 12 ++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) diff --cc mysql-test/r/func_math.result index ff2e929cffc,4215a82e3f0..d79d425841e --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@@ -826,20 -805,48 +826,60 @@@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FR STDDEV_POP(ROUND(0,@A:=2009)) 0.0000 # -# End of 10.0 tests -# -# + # Start of 10.1 tests + # + # + # MDEV-17643 Assertion `nr >= 0.0' failed in Item_sum_std::val_real() + # + 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; + STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1)))) + NULL + Warnings: + Warning 1292 Truncated incorrect DOUBLE value: 'o' + Warning 1292 Truncated incorrect DOUBLE value: '98e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde242' + Warning 1292 Truncated incorrect DOUBLE value: 'o' + Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315' + Warning 1292 Truncated incorrect DOUBLE value: 'o' + Warning 1292 Truncated incorrect DOUBLE value: '7b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b527974-1379790335835635712b4dd517b6' + Warning 1292 Truncated incorrect DOUBLE value: 'o' + Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e1' + 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; + STDDEV_SAMP(a) + NULL + Warnings: + Warning 1292 Truncated incorrect DOUBLE value: '1e310' + Warning 1292 Truncated incorrect DOUBLE value: '-1e310' + 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; + STDDEV_SAMP(a) + NULL + DROP TABLE t1; + # -# End of 10.1 tests +# Start of 10.2 tests +# +# Test zero +select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1); +0=0 0=-0 0.0= -0.0 0.0 = -(0.0) 0.0E1=-0.0E1 0.0E1=-(0.0E1) +1 1 1 1 1 1 +# +# CRC32 tests # +select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678'); +CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678') +NULL 0 3259397556 2501908538 763378421 939184570 +explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1); +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 +Warnings: +Note 1003 select 3 - 2 + 1 AS `(3-2)+1`,3 / 2 * 1 AS `(3/2)*1`,3 - (2 + 1) AS `3-(2+1)`,3 / (2 * 1) AS `3/(2*1)` diff --cc mysql-test/t/func_math.test index 0b819278a44,4c2d7921593..ec226d472b3 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@@ -596,20 -596,39 +596,47 @@@ DROP TABLE t1 --echo # 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 # Start of 10.2 tests +--echo # + +--echo # Test zero +select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1); --echo # ---echo # End of 10.1 tests +--echo # CRC32 tests --echo # + +select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678'); + +# +# MDEV-13673 Bad result in view +# +explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
participants (1)
-
jan