mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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.
This commit is contained in:
parent
5c7111cb7c
commit
6da2adfaa2
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue