mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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:
@@ -1828,6 +1828,7 @@ int write_bin_log(THD *thd, bool clear_error,
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
int errcode= 0;
|
||||
thd_proc_info(thd, "Writing to binlog");
|
||||
if (clear_error)
|
||||
thd->clear_error();
|
||||
else
|
||||
@@ -1835,6 +1836,7 @@ int write_bin_log(THD *thd, bool clear_error,
|
||||
error= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
query, query_length, is_trans, FALSE, FALSE,
|
||||
errcode);
|
||||
thd_proc_info(thd, 0);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user