1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 11.4 into 11.7

This commit is contained in:
Marko Mäkelä
2025-01-09 09:41:38 +02:00
552 changed files with 12641 additions and 3550 deletions

View File

@@ -2395,13 +2395,27 @@ resume:
{
WSREP_DEBUG("THD is killed at dispatch_end");
}
wsrep_after_command_before_result(thd);
if (wsrep_current_error(thd) && !wsrep_command_no_result(command))
if (thd->lex->sql_command != SQLCOM_SET_OPTION)
{
/* todo: Pass wsrep client state current error to override */
wsrep_override_error(thd, wsrep_current_error(thd),
wsrep_current_error_status(thd));
WSREP_LOG_THD(thd, "leave");
DEBUG_SYNC(thd, "wsrep_at_dispatch_end_before_result");
}
if (thd->wsrep_cs().state() == wsrep::client_state::s_exec)
{
wsrep_after_command_before_result(thd);
if (wsrep_current_error(thd) && !wsrep_command_no_result(command))
{
/* todo: Pass wsrep client state current error to override */
wsrep_override_error(thd, wsrep_current_error(thd),
wsrep_current_error_status(thd));
WSREP_LOG_THD(thd, "leave");
}
}
else
{
/* wsrep_after_command_before_result() already called elsewhere
or not necessary to call it */
assert(thd->wsrep_cs().state() == wsrep::client_state::s_none ||
thd->wsrep_cs().state() == wsrep::client_state::s_result);
}
if (WSREP(thd))
{