diff options
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 9e321411863..5a2e2f7d419 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2930,6 +2930,12 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor) 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 on the parse tree of current prepared statement and new items should |