Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
681fbcaf
Commit
681fbcaf
authored
Aug 01, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix func_time.test to be independent from the system time zone
parent
5b452ae0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+3
-3
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+2
-2
No files found.
mysql-test/r/func_time.result
View file @
681fbcaf
...
@@ -2004,6 +2004,7 @@ a
...
@@ -2004,6 +2004,7 @@ a
2000-02-23
2000-02-23
2005-05-04
2005-05-04
DROP TABLE t1;
DROP TABLE t1;
SET TIME_ZONE='+02:00';
#
#
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
#
#
...
@@ -2011,8 +2012,8 @@ CREATE TABLE t1 (a DATE);
...
@@ -2011,8 +2012,8 @@ CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
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;
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
a f1 f2
a f1 f2
2005-05-04 1970-01-01 0
3:33:25 1970010103
3325.000000
2005-05-04 1970-01-01 0
2:33:25 1970010102
3325.000000
2000-02-23 1970-01-01 0
3:33:20 1970010103
3320.000000
2000-02-23 1970-01-01 0
2:33:20 1970010102
3320.000000
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
a
a
2000-02-23
2000-02-23
...
@@ -2046,7 +2047,6 @@ DROP TABLE t1,t2;
...
@@ -2046,7 +2047,6 @@ DROP TABLE t1,t2;
#
#
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
#
#
SET TIME_ZONE='+02:00';
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
NULL
NULL
...
...
mysql-test/t/func_time.test
View file @
681fbcaf
...
@@ -1212,6 +1212,7 @@ SELECT * FROM t1 GROUP BY @a:=(FROM_UNIXTIME(concat(a,'10'))*1);
...
@@ -1212,6 +1212,7 @@ SELECT * FROM t1 GROUP BY @a:=(FROM_UNIXTIME(concat(a,'10'))*1);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
SET
TIME_ZONE
=
'+02:00'
;
--
echo
#
--
echo
#
--
echo
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
--
echo
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
...
@@ -1239,10 +1240,9 @@ DROP TABLE t1,t2;
...
@@ -1239,10 +1240,9 @@ DROP TABLE t1,t2;
--
echo
#
--
echo
#
--
echo
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
--
echo
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
--
echo
#
--
echo
#
SET
TIME_ZONE
=
'+02:00'
;
SELECT
UNIX_TIMESTAMP
(
STR_TO_DATE
(
'2020'
,
'%Y'
));
SELECT
UNIX_TIMESTAMP
(
STR_TO_DATE
(
'2020'
,
'%Y'
));
SET
TIME_ZONE
=
DEFAULT
;
SET
TIME_ZONE
=
DEFAULT
;
--
echo
#
--
echo
#
--
echo
# MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context
--
echo
# MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment