1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-05 12:42:17 +03:00

MDEV-16708: Fixed the failed test main.set_statement

This commit is contained in:
Dmitry Shulga
2021-05-19 11:28:58 +07:00
committed by Sergei Golubchik
parent b33111ba93
commit a00b51f639
6 changed files with 72 additions and 18 deletions

View File

@ -2419,7 +2419,18 @@ resume:
thd->update_all_stats();
log_slow_statement(thd);
/*
Write to slow query log only those statements that received via the text
protocol except the EXECUTE statement. The reason we do that way is
that for statements received via binary protocol and for the EXECUTE
statement, the slow statements have been already written to slow query log
inside the method Prepared_statement::execute().
*/
if(command == COM_QUERY &&
thd->lex->sql_command != SQLCOM_EXECUTE)
log_slow_statement(thd);
else
delete_explain_query(thd->lex);
THD_STAGE_INFO(thd, stage_cleaning_up);
thd->reset_query();