List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:October 15 2008 5:38pm
Subject:bzr commit into mysql-6.0-backup branch (cbell:2709) Bug#39825
View as plain text  
#At file:///C:/source/bzr/mysql-6.0-bug-39825/

 2709 Chuck Bell	2008-10-15
      BUG#39825 : Incorrect validity point reported during restore on Windows Vista
      
      The backup.backup test was failing due to incorrect validity point
      calculation on Windows Vista.
modified:
  sql/backup/image_info.h

per-file messages:
  sql/backup/image_info.h
    Calculation of start of 1970, mktime(), returns -1 on Vista.
    Removed calculation of start of 1970 in favor of cast of timezone
    to time_t.
=== modified file 'sql/backup/image_info.h'
--- a/sql/backup/image_info.h	2008-10-14 12:08:56 +0000
+++ b/sql/backup/image_info.h	2008-10-15 15:38:28 +0000
@@ -752,15 +752,9 @@ inline
 time_t Image_info::get_vp_time() const
 {
   struct tm time;
-  time_t tz_offset;
 
   bzero(&time,sizeof(time));
 
-  // Determine system timezone offset by calculating offset of the Epoch date.
-  time.tm_year=70;
-  time.tm_mday=1;
-  tz_offset= mktime(&time);
-
   time.tm_year= vp_time.year;
   time.tm_mon= vp_time.mon;
   time.tm_mday= vp_time.mday;
@@ -772,7 +766,7 @@ time_t Image_info::get_vp_time() const
     Note: mktime() assumes that time is expressed as local time and vp_time is
     in UTC. Hence we must correct the result to get it right.
    */ 
-  return mktime(&time) - tz_offset;
+  return mktime(&time) - (time_t)timezone;
 }
 
 /**

Thread
bzr commit into mysql-6.0-backup branch (cbell:2709) Bug#39825Chuck Bell15 Oct