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
This commit is contained in:
Dmitry Shulga 2021-04-22 23:21:54 +07:00 committed by Sergei Golubchik
parent 9370c6e83c
commit d5836a6277

View File

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