From: jack andrews Date: April 15 2009 12:39pm Subject: bzr commit into mysql-5.1-telco-7.0 branch (jack:2868) Bug#44276 List-Archive: http://lists.mysql.com/commits/72152 X-Bug: 44276 Message-Id: <0KI5000OJ76KX230@mail-apac.sun.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_KLNcfACsREZlPteg0f8DiA)" --Boundary_(ID_KLNcfACsREZlPteg0f8DiA) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline #At file:///C:/w/repo/70/ based on revid:jack@stripped 2868 jack andrews 2009-04-15 bug#44276 NdbTick assert() in Ndbif.cpp modified: storage/ndb/src/common/portlib/win32/NdbTick.c === modified file 'storage/ndb/src/common/portlib/win32/NdbTick.c' --- a/storage/ndb/src/common/portlib/win32/NdbTick.c 2008-10-02 09:41:59 +0000 +++ b/storage/ndb/src/common/portlib/win32/NdbTick.c 2009-04-15 12:39:16 +0000 @@ -15,6 +15,7 @@ #include #include "NdbTick.h" +#include void NdbTick_Init() { @@ -31,11 +32,14 @@ NDB_TICKS NdbTick_CurrentMillisecond(voi int NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros) { - LARGE_INTEGER liCount, liFreq; - QueryPerformanceCounter(&liCount); - QueryPerformanceFrequency(&liFreq); - *secs = liCount.QuadPart / liFreq.QuadPart; - liCount.QuadPart -= *secs * liFreq.QuadPart; - *micros = (Uint32)((liCount.QuadPart*1000000) / liFreq.QuadPart); + ulonglong t=my_micro_time(), + ullsecs, + ullmicros; + + ullsecs=t/(1000*1000); + ullmicros=t-ullsecs; + assert(ullmicros