From d5836a627746f928a8c6127503c1a0f11d8b4726 Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Thu, 22 Apr 2021 23:21:54 +0700 Subject: MDEV-16708: Unsupported commands for prepared statements Extended a set of commands that can be executed as prepared statements by a user with expired password --- sql/sql_prepare.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 1510844a7e7..2ef389011a2 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -4380,7 +4380,10 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) init_param_array(this)); if (thd->security_ctx->password_expired && - lex->sql_command != SQLCOM_SET_OPTION) + lex->sql_command != SQLCOM_SET_OPTION && + lex->sql_command != SQLCOM_PREPARE && + lex->sql_command != SQLCOM_EXECUTE && + lex->sql_command != SQLCOM_DEALLOCATE_PREPARE) { thd->restore_backup_statement(this, &stmt_backup); thd->restore_active_arena(this, &stmt_backup); -- cgit v1.2.1