1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
--echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
--echo #
This commit is contained in:
Alexander Barkov
2018-12-12 10:39:06 +04:00
parent 4abb8216a0
commit c353b2a8fc
8 changed files with 125 additions and 1 deletions

View File

@ -542,5 +542,18 @@ SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
a b
DROP TABLE t1;
#
# MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
#
SET time_zone='+00:00';
CREATE TABLE t1 (a INT, ts TIMESTAMP) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1, FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
SET time_zone='Europe/Moscow';
CREATE TABLE t2 AS SELECT ts, COALESCE(ts) AS cts FROM t1 GROUP BY cts;
SELECT ts, cts, UNIX_TIMESTAMP(ts) AS uts, UNIX_TIMESTAMP(cts) AS ucts FROM t2;
ts cts uts ucts
2010-10-31 02:25:26 2010-10-31 02:25:26 1288481126 1288481126
DROP TABLE t1,t2;
SET time_zone=DEFAULT;
#
# End of 10.4 tests
#