1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä
2021-04-14 11:35:39 +03:00
137 changed files with 1947 additions and 632 deletions

View File

@ -1663,7 +1663,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (unlikely(thd->security_ctx->password_expired &&
command != COM_QUERY &&
command != COM_PING &&
command != COM_QUIT))
command != COM_QUIT &&
command != COM_STMT_PREPARE &&
command != COM_STMT_EXECUTE))
{
my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
goto dispatch_end;
@ -3530,7 +3532,10 @@ mysql_execute_command(THD *thd)
first_table->for_insert_data);
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)
{
my_error(ER_MUST_CHANGE_PASSWORD, MYF(0));
DBUG_RETURN(1);
@ -3822,7 +3827,8 @@ mysql_execute_command(THD *thd)
thd->transaction->stmt.mark_trans_did_ddl();
#ifdef WITH_WSREP
/* Clean up the previous transaction on implicit commit */
if (wsrep_thd_is_local(thd) && wsrep_after_statement(thd))
if (WSREP_NNULL(thd) && wsrep_thd_is_local(thd) &&
wsrep_after_statement(thd))
{
goto error;
}
@ -3896,7 +3902,7 @@ mysql_execute_command(THD *thd)
Do not start transaction for stored procedures, it will be handled
internally in SP processing.
*/
if (WSREP(thd) &&
if (WSREP_NNULL(thd) &&
wsrep_thd_is_local(thd) &&
lex->sql_command != SQLCOM_BEGIN &&
lex->sql_command != SQLCOM_CALL &&