List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:October 26 2006 12:34am
Subject:bk commit into 5.0 tree (iggy:1.2328) BUG#17635
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of Administrator. When Administrator does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-10-25 20:34:13-04:00, iggy@amd64. +1 -0
  Bug#17635 Sleep time long process after time clock adjust in system.
  - Windows version of my_getsystime() only checked the local system time
  the first time it was called.  Changes to system time would either delay
  or increase the sleep period by the amount of time changed.

  mysys/my_getsystime.c@stripped, 2006-10-25 19:50:57-04:00, iggy@amd64. +3 -21
    Bug#17635 Sleep time long process after time clock adjust in system.
    - Changed Windows version of my_getsystime to use GetSystemTimeAsFileTime
    each time function is called.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	iggy
# Host:	amd64.
# Root:	D:/src/mysql-5.0-maint_bug17635

--- 1.5/mysys/my_getsystime.c	2006-10-25 20:34:24 -04:00
+++ 1.6/mysys/my_getsystime.c	2006-10-25 20:34:24 -04:00
@@ -31,27 +31,9 @@
   return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
 #elif defined(__WIN__)
 #define OFFSET_TO_EPOC ((__int64) 134774 * 24 * 60 * 60 * 1000 * 1000 * 10)
-  static __int64 offset=0, freq;
-  LARGE_INTEGER t_cnt;
-  if (!offset)
-  {
-    /* strictly speaking there should be a mutex to protect
-       initialization section. But my_getsystime() is called from
-       UUID() code, and UUID() calls are serialized with a mutex anyway
-    */
-    LARGE_INTEGER li;
-    FILETIME ft;
-    GetSystemTimeAsFileTime(&ft);
-    li.LowPart=ft.dwLowDateTime;
-    li.HighPart=ft.dwHighDateTime;
-    offset=li.QuadPart-OFFSET_TO_EPOC;
-    QueryPerformanceFrequency(&li);
-    freq=li.QuadPart;
-    QueryPerformanceCounter(&t_cnt);
-    offset-=t_cnt.QuadPart/freq*10000000+t_cnt.QuadPart%freq*10000000/freq;
-  }
-  QueryPerformanceCounter(&t_cnt);
-  return t_cnt.QuadPart/freq*10000000+t_cnt.QuadPart%freq*10000000/freq+offset;
+  FILETIME ft;
+  GetSystemTimeAsFileTime(&ft);
+  return (ulonglong)((__int64)ft.dwHighDateTime << 32) + ft.dwLowDateTime - OFFSET_TO_EPOC;
 #elif defined(__NETWARE__)
   NXTime_t tm;
   NXGetTime(NX_SINCE_1970, NX_NSECONDS, &tm);
Thread
bk commit into 5.0 tree (iggy:1.2328) BUG#17635Ignacio Galarza26 Oct