Skip to content

Commit d5836a6

Browse files
dmitryshulgavuvova
authored andcommitted
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
1 parent 9370c6e commit d5836a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sql/sql_prepare.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4380,7 +4380,10 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
43804380
init_param_array(this));
43814381

43824382
if (thd->security_ctx->password_expired &&
4383-
lex->sql_command != SQLCOM_SET_OPTION)
4383+
lex->sql_command != SQLCOM_SET_OPTION &&
4384+
lex->sql_command != SQLCOM_PREPARE &&
4385+
lex->sql_command != SQLCOM_EXECUTE &&
4386+
lex->sql_command != SQLCOM_DEALLOCATE_PREPARE)
43844387
{
43854388
thd->restore_backup_statement(this, &stmt_backup);
43864389
thd->restore_active_arena(this, &stmt_backup);

0 commit comments

Comments
 (0)