mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11628 mysql.slow_log reports incorrect start time
use thd->start_time for the "start_time" column of the slow_log table. "current_time" here refers to the current_time() function return value not to the actual *current* time. also fixes MDEV-33267 User with minimal permissions can intentionally corrupt mysql.slow_log table
This commit is contained in:
@ -1334,7 +1334,7 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, size_t query_length,
|
||||
query_utime= (current_utime - thd->start_utime);
|
||||
lock_utime= (thd->utime_after_lock - thd->start_utime);
|
||||
my_hrtime_t current_time= { hrtime_from_time(thd->start_time) +
|
||||
thd->start_time_sec_part + query_utime };
|
||||
thd->start_time_sec_part };
|
||||
|
||||
if (!query || thd->get_command() == COM_STMT_PREPARE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user