8.0.16 evaluates from_unixtime() correctly ...
select version(), from_unixtime(1360863880706/1000);
+-----------+-----------------------------------+
| version() | from_unixtime(1360863880706/1000) |
+-----------+-----------------------------------+
| 8.0.16 | 2013-02-14 09:44:40.7060 |
+-----------+-----------------------------------+
... but for it to be compared to a string, it needs the value cast to char ...
mysql> select from_unixtime(1360863880706/1000) > '';
ERROR 1525 (HY000): Incorrect DATETIME value: ''
select cast(from_unixtime(1360863880706/1000) as char) > '';
+------------------------------------------------------+
| cast(from_unixtime(1360863880706/1000) as char) > '' |
+------------------------------------------------------+
| 1 |
+------------------------------------------------------+
5.7 doesn't need that, and the 8.0 manual page doesn't mention it, so it looks like a documentation omission you might want to report on the bugs page.
Edited 1 time(s). Last edit at 05/21/2019 11:57AM by Peter Brawley.