1
0
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:
tsmith/tim@siva.hindu.god
2006-10-03 21:26:55 -06:00
parent c3820867ce
commit f5c4d75e8f
7 changed files with 45 additions and 5 deletions

View File

@@ -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";