1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug #19764: SHOW commands end up in the slow log as table scans

Do not consider SHOW commands slow queries, just because they don't use proper indexes.

This bug fix is not needed in 5.1, and the code changes will be null merged.  However, the test cases will be propogated up to 5.1.
This commit is contained in:
tsmith/tim@siva.hindu.god
2006-10-12 17:10:34 -06:00
parent 360540e891
commit 0e3cfe02ec
9 changed files with 74 additions and 6 deletions

View File

@ -2908,6 +2908,12 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
stmt_backup.query= thd->query;
stmt_backup.query_length= thd->query_length;
/*
Save orig_sql_command as we use it to disable slow logging for SHOW
commands (see log_slow_statement()).
*/
stmt_backup.lex->orig_sql_command= thd->lex->orig_sql_command;
/*
At first execution of prepared statement we may perform logical
transformations of the query tree. Such changes should be performed