mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#24687 func_misc test fails on win64
- Use same precision (milliseconds) for all time functions used when calculating time for pthread_cond_timedwait - Use 'GetSystemTimeAsFileTime' for both start and curr time
This commit is contained in:
@ -228,9 +228,8 @@ void Guardian_thread::run()
|
||||
|
||||
node= node->next;
|
||||
}
|
||||
timeout.tv_sec= time(NULL) + monitoring_interval;
|
||||
timeout.tv_nsec= 0;
|
||||
|
||||
set_timespec(timeout, monitoring_interval);
|
||||
|
||||
/* check the loop predicate before sleeping */
|
||||
if (!(shutdown_requested && (!(guarded_instances))))
|
||||
thread_registry.cond_timedwait(&thread_info, &COND_guardian,
|
||||
|
@ -476,10 +476,9 @@ int Instance::stop()
|
||||
waitchild= options.shutdown_delay_val;
|
||||
|
||||
kill_instance(SIGTERM);
|
||||
/* sleep on condition to wait for SIGCHLD */
|
||||
|
||||
timeout.tv_sec= time(NULL) + waitchild;
|
||||
timeout.tv_nsec= 0;
|
||||
/* sleep on condition to wait for SIGCHLD */
|
||||
set_timespec(timeout, waitchild);
|
||||
if (pthread_mutex_lock(&LOCK_instance))
|
||||
return ER_STOP_INSTANCE;
|
||||
|
||||
|
Reference in New Issue
Block a user