Commit adf6e145 authored by Sergei Golubchik's avatar Sergei Golubchik

win fixes in semisync plugin

parent 36c738e4
......@@ -48,11 +48,7 @@ static int getWaitTime(const struct timespec& start_ts);
static unsigned long long timespec_to_usec(const struct timespec *ts)
{
#ifndef __WIN__
return (unsigned long long) ts->tv_sec * TIME_MILLION + ts->tv_nsec / TIME_THOUSAND;
#else
return ts->tv.i64 / 10;
#endif /* __WIN__ */
}
/*******************************************************************************
......@@ -681,10 +677,6 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
}
/* Calcuate the waiting period. */
#ifdef __WIN__
abstime.tv.i64 = start_ts.tv.i64 + (__int64)wait_timeout_ * TIME_THOUSAND * 10;
abstime.max_timeout_msec= (long)wait_timeout_;
#else
unsigned long long diff_nsecs =
start_ts.tv_nsec + (unsigned long long)wait_timeout_ * TIME_MILLION;
abstime.tv_sec = start_ts.tv_sec;
......@@ -694,7 +686,6 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
diff_nsecs -= TIME_BILLION;
}
abstime.tv_nsec = diff_nsecs;
#endif /* __WIN__ */
/* In semi-synchronous replication, we wait until the binlog-dump
* thread has received the reply on the relevant binlog segment from the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment