Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
5.5.56
-
None
-
Centos 7
Description
Setup:
CREATE TABLE t1 (c1 TIME); |
INSERT INTO t1 VALUES('06:01:00'); |
Now:
SELECT UNIX_TIMESTAMP(CONCAT('2018-01-01 ',c1)) FROM t1; |
produces "1514815560.000000"
while:
SELECT UNIX_TIMESTAMP(CAST(CONCAT('2018-01-01 ',c1) AS DATETIME)) FROM t1; |
produces "1514815560"
Yet:
SELECT UNIX_TIMESTAMP(CONCAT('2018-01-01 ','06:01:00')); |
produces "1514815260"
and
SELECT UNIX_TIMESTAMP(CONCAT('2018-01-01 ',CAST('06:01:00' AS time))); |
still produces "1514815260"
Same as MySQL bug #82070. Similar to MDEV-3922.
Also, per https://mariadb.com/kb/en/library/unix_timestamp/
SELECT UNIX_TIMESTAMP('2007-11-30 10:30:19'); |
should return decimal as of 5.3, but it does not in 5.5.
Attachments
Issue Links
- relates to
-
MDEV-3922 UNIX_TIMESTAMP() reports decimal when date specified as string
- Closed