Commit 681fbcaf authored by Sergei Golubchik's avatar Sergei Golubchik

fix func_time.test to be independent from the system time zone

parent 5b452ae0
......@@ -2004,6 +2004,7 @@ a
2000-02-23
2005-05-04
DROP TABLE t1;
SET TIME_ZONE='+02:00';
#
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
#
......@@ -2011,8 +2012,8 @@ CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
a f1 f2
2005-05-04 1970-01-01 03:33:25 19700101033325.000000
2000-02-23 1970-01-01 03:33:20 19700101033320.000000
2005-05-04 1970-01-01 02:33:25 19700101023325.000000
2000-02-23 1970-01-01 02:33:20 19700101023320.000000
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
a
2000-02-23
......@@ -2046,7 +2047,6 @@ DROP TABLE t1,t2;
#
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
#
SET TIME_ZONE='+02:00';
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
NULL
......
......@@ -1212,6 +1212,7 @@ SELECT * FROM t1 GROUP BY @a:=(FROM_UNIXTIME(concat(a,'10'))*1);
DROP TABLE t1;
SET TIME_ZONE='+02:00';
--echo #
--echo # MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
......@@ -1239,10 +1240,9 @@ DROP TABLE t1,t2;
--echo #
--echo # MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
--echo #
SET TIME_ZONE='+02:00';
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
SET TIME_ZONE=DEFAULT;
SET TIME_ZONE=DEFAULT;
--echo #
--echo # MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment