Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
11.7.2
-
None
-
OS: Archlinux x64
mariadb from 11.7.2-MariaDB
Description
Using FROM_UNIXTIME(0) in WHERE results in warning with no data returned. The code worked correctly in mariadb 11.6.2
Example query:
SELECT * FROM `some_table` WHERE (`timestamp` >= FROM_UNIXTIME(0) OR `timestamp` IS NULL)
Example result:
/* Warning: (1292) Truncated incorrect unixtime value: '0.0' */
/* Affected rows: 0 Found rows: 0 Warnings: 1 Duration for 1 query: 0.000 sec. */
db-fiddle to assist reproduction
https://www.db-fiddle.com/f/cmPANek4oQkNfFMRLrfYSA/0
The same problem exist with the invers function:
MariaDB [test]> select unix_timestamp("1970-01-01 02:00:00");
+---------------------------------------+
|
| unix_timestamp("1970-01-01 02:00:00") | |
+---------------------------------------+
|
| NULL |
|
+---------------------------------------+
|
Attachments
Issue Links
- relates to
-
MDEV-15751 CURRENT_TIMESTAMP should return a TIMESTAMP (WITH TIME ZONE?)
-
- Closed
-
Please close answered here https://mariadb.com/kb/en/from_unixtime/#performance-considerations