mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 17:14:30 +02:00
MDEV-29311 Server Status Innodb_row_lock_time% is reported in seconds
Before MDEV-24671, the wait time was derived from my_interval_timer() / 1000 (nanoseconds converted to microseconds, and not microseconds to milliseconds like I must have assumed). The lock_sys.wait_time and lock_sys.wait_time_max are already in milliseconds; we should not divide them by 1000. In MDEV-24738 the millisecond counts lock_sys.wait_time and lock_sys.wait_time_max were changed to a 32-bit type. That would overflow in 49.7 days. Keep using a 64-bit type for those millisecond counters. Reviewed by: Marko Mäkelä
This commit is contained in:
parent
6ed14bcc06
commit
090a84366a
8 changed files with 100 additions and 23 deletions
|
|
@ -1648,8 +1648,8 @@ void lock_sys_t::wait_resume(THD *thd, my_hrtime_t start, my_hrtime_t now)
|
|||
wait_count--;
|
||||
if (now.val >= start.val)
|
||||
{
|
||||
const uint32_t diff_time=
|
||||
static_cast<uint32_t>((now.val - start.val) / 1000);
|
||||
const uint64_t diff_time=
|
||||
static_cast<uint64_t>((now.val - start.val) / 1000);
|
||||
wait_time+= diff_time;
|
||||
|
||||
if (diff_time > wait_time_max)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue