| Bug #6439 | from_unixtime() function returns wrong datetime values for too big argument | ||
|---|---|---|---|
| Submitted: | 4 Nov 2004 18:32 | Modified: | 19 Nov 2004 19:20 |
| Reporter: | Dmitry Lenev | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.0.23-bk | OS: | Any (any) |
| Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[19 Nov 2004 19:20]
Dmitry Lenev
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Additional info:
ChangeSet 1.2061.1.1 2004/11/15 16:11:13 dlenev@mysql.com
Proposed fix for bug #6439 "from_unixtime() function returns wrong datetime
values for too big argument".

Description: On systems where sizeof(time_t)==4 (e.g. Linux x86) MySQL's from_unixtime() function returns wrong datetime value if its argument is too big to fit into 32bits. It should return error instead. How to repeat: mysql> select from_unixtime(100000000000); +-----------------------------+ | from_unixtime(100000000000) | +-----------------------------+ | 2008-07-11 08:56:32 | +-----------------------------+ 1 row in set (0.00 sec) mysql> select unix_timestamp('2008-07-11 08:56:32'); +---------------------------------------+ | unix_timestamp('2008-07-11 08:56:32') | +---------------------------------------+ | 1215752192 | +---------------------------------------+ 1 row in set (0.00 sec)