mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added THD::utime_after_query to avoid calling current_utime() twice for every end-of-query
Increment long_query_count also if thd->variables.log_slow_rate_limit is used Added new state "Writing to binlog" sql/sql_class.h: Added THD::utime_after_query to avoid calling current_utime() twice for every end-of-query sql/sql_parse.cc: Increment long_query_count also if thd->variables.log_slow_rate_limit is used Removed extra calls to thd_proc_info(thd, "logging slow query") and thd->current_utime(); sql/sql_table.cc: Added new state "Writing to binlog"
This commit is contained in:
@ -1685,7 +1685,7 @@ public:
|
||||
my_hrtime_t user_time;
|
||||
// track down slow pthread_create
|
||||
ulonglong prior_thr_create_utime, thr_create_utime;
|
||||
ulonglong start_utime, utime_after_lock;
|
||||
ulonglong start_utime, utime_after_lock, utime_after_query;
|
||||
|
||||
// Process indicator
|
||||
struct {
|
||||
@ -2488,8 +2488,8 @@ public:
|
||||
*/
|
||||
void update_server_status()
|
||||
{
|
||||
ulonglong end_utime_of_query= current_utime();
|
||||
if (end_utime_of_query > utime_after_lock + variables.long_query_time)
|
||||
utime_after_query= current_utime();
|
||||
if (utime_after_query > utime_after_lock + variables.long_query_time)
|
||||
server_status|= SERVER_QUERY_WAS_SLOW;
|
||||
}
|
||||
inline ulonglong found_rows(void)
|
||||
|
Reference in New Issue
Block a user