Bug #19408 Test 'func_time' fails on Windows x64
Submitted: 27 Apr 2006 19:52 Modified: 3 Jul 2006 19:13
Reporter: Kent Boortz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.21 OS:Windows (Windows 2003 x64)
Assigned to: Tatiana Azundris Nuernberg CPU Architecture:Any

[27 Apr 2006 19:52] Kent Boortz
Description:
Test 'func_time' fails with

 *** r/func_time.result Thu Apr 27 17:59:31 2006
 --- r/func_time.reject Thu Apr 27 19:06:04 2006
 ***************
 *** 702,711 ****
   19971231.0
   select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0;
   strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0
 ! 1
   select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0;
   strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0
 ! 1
   select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0;
   strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0
   1
 --- 702,711 ----
   19971231.0
   select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0;
   strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0
 ! 0
   select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0;
   strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0
 ! 0
   select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0;
   strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0
   1

How to repeat:
Run the test case on Windows x64
[12 Jun 2006 11:03] Magnus Blåudd
The timezone selected by the MySQL Server is not GMT-3 as expected. It' set to SYSTEM and if the system timezone is not GMT-3, it will display the wrong value.
[14 Jun 2006 8:26] Magnus Blåudd
This is reproduced on linux by uncommenting the line where we set TZ in environment
$ENV{'TZ'}= $tinfo->{'timezone'};
[14 Jun 2006 14:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/7633
[22 Jun 2006 18:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8094
[26 Jun 2006 18:13] Tatiana Azundris Nuernberg
fixed in 5.0.23
[3 Jul 2006 19:13] Paul DuBois
Changes to test case only.
No changelog entry needed.