Bug #29109 Maximum positive timestamp value shifted by 3 hours
Submitted: 14 Jun 2007 15:10 Modified: 9 Jan 2008 17:31
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:Other (SCO)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[14 Jun 2007 15:10] Joerg Bruehe
Description:
Found during the 4.1.23 release builds,
specific to the SCO platform
(but see bug#29108 for another timestamp limit problem):

-------------------------------------------------------
*** 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)
! 2038-01-19 03:14:07
  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))
! 2147472847
  select unix_timestamp(from_unixtime(2147483648));
  unix_timestamp(from_unixtime(2147483648))
  NULL
-------------------------------------------------------

How to repeat:
Found by running the test suite.