mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Bug #19764: SHOW commands end up in the slow log as table scans
Set a flag when a SHOW command is parsed, and check it in log_slow_statement(). SHOW commands are not counted as slow queries, even if they use table scans.
This commit is contained in:
@@ -2150,10 +2150,10 @@ void log_slow_statement(THD *thd)
|
||||
thd->end_time(); // Set start time
|
||||
|
||||
/*
|
||||
Do not log administrative statements unless the appropriate option is
|
||||
set; do not log into slow log if reading from backup.
|
||||
Do not log administrative or SHOW statements unless the appropriate
|
||||
option is set; do not log into slow log if reading from backup.
|
||||
*/
|
||||
if (thd->enable_slow_log && !thd->user_time)
|
||||
if (thd->enable_slow_log && !thd->user_time && !thd->lex->is_show_command)
|
||||
{
|
||||
thd->proc_info="logging slow query";
|
||||
|
||||
|
Reference in New Issue
Block a user