Bug #29108 Maximum positive (32 bit) timestamp value turning negative
Submitted: 14 Jun 2007 15:05 Modified: 9 Jan 2008 17:32
Reporter: Joerg Bruehe Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:4.1.23 OS:IBM AIX (4.3 + 5.2 (32 bit))
Assigned to: Ramil Kalimullin CPU Architecture:Any
Triage: D3 (Medium)

[14 Jun 2007 15:05] Joerg Bruehe
Description:
This occurred in the 4.1.23 release build, on our AIX hosts 
(both version 4.3 and 5.2, but 32 bit only):

-------------------------------------------------------
*** r/func_time.result
--- r/func_time.reject
***************
*** 487,493
  NULL
  select from_unixtime(2147483647);
  from_unixtime(2147483647)
! 2038-01-19 06:14:07
  select from_unixtime(2147483648);
  from_unixtime(2147483648)
  NULL
--- 487,493
  NULL
  select from_unixtime(2147483647);
  from_unixtime(2147483647)
! 1901-12-13 23:45:51
  select from_unixtime(2147483648);
  from_unixtime(2147483648)
  NULL
***************
*** 496,502
  1970-01-01 03:00:00
  select unix_timestamp(from_unixtime(2147483647));
  unix_timestamp(from_unixtime(2147483647))
! 2147483647
  select unix_timestamp(from_unixtime(2147483648));
  unix_timestamp(from_unixtime(2147483648))
  NULL
--- 496,502
  1970-01-01 03:00:00
  select unix_timestamp(from_unixtime(2147483647));
  unix_timestamp(from_unixtime(2147483647))
! 0
  select unix_timestamp(from_unixtime(2147483648));
  unix_timestamp(from_unixtime(2147483648))
  NULL
-------------------------------------------------------

How to repeat:
Found by running the test suite.