Commit 6da2adfa authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-12005: GET_LOCK: Fractional part of timeout is ignored

In order to include the fractional part, convert lock_wait_timeout
(in secs) to nanoseconds before calculating the absolute time for
timeout.
parent 5c7111cb
......@@ -2113,7 +2113,8 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
find_deadlock();
struct timespec abs_timeout, abs_shortwait;
set_timespec(abs_timeout, (ulonglong) lock_wait_timeout);
set_timespec_nsec(abs_timeout,
(ulonglong)(lock_wait_timeout * 1000000000ULL));
set_timespec(abs_shortwait, 1);
wait_status= MDL_wait::EMPTY;
......
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