diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-12-20 15:55:55 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-12-20 15:59:09 +0400 |
commit | 5e0c80c2a53c494a517289e5ed95b1aa52010b49 (patch) | |
tree | a1d66202cc6020a3cdb8029385b2d53e827a9e99 /mysql-test/main/timezone2.result | |
parent | 088de81d965f1b5ae2f50b1ed6e7cfccc0366098 (diff) | |
download | mariadb-git-5e0c80c2a53c494a517289e5ed95b1aa52010b49.tar.gz |
An extra test with NULLIF() for MDEV-13995 MAX(timestamp) returns a wrong result near DST change
Diffstat (limited to 'mysql-test/main/timezone2.result')
-rw-r--r-- | mysql-test/main/timezone2.result | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result index b858e761a81..f943e285951 100644 --- a/mysql-test/main/timezone2.result +++ b/mysql-test/main/timezone2.result @@ -574,6 +574,22 @@ a b SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1)); a b DROP TABLE t1; +SET time_zone='Europe/Moscow'; +CREATE TABLE t1 (a TIMESTAMP); +CREATE TABLE t2 (a TIMESTAMP); +SET timestamp=1288479599 /*summer time in Mowcow*/; +INSERT INTO t1 VALUES (CURRENT_TIMESTAMP); +SET timestamp=1288479599+3600 /*winter time in Mowcow*/; +INSERT INTO t2 VALUES (CURRENT_TIMESTAMP); +SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1, t2; +a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a) +2010-10-31 02:59:59 1288479599 2010-10-31 02:59:59 1288483199 +SELECT NULLIF(t1.a, t2.a) FROM t1,t2; +NULLIF(t1.a, t2.a) +2010-10-31 02:59:59 +DROP TABLE t1, t2; +SET time_zone=DEFAULT; +SET timestamp=DEFAULT; # # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY # |