1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch '10.5' into '10.6'

This commit is contained in:
Julius Goryavsky
2024-12-18 05:09:23 +01:00
17 changed files with 221 additions and 115 deletions

View File

@@ -1157,8 +1157,7 @@ static bool wsrep_command_no_result(char command)
{
return (command == COM_STMT_FETCH ||
command == COM_STMT_SEND_LONG_DATA ||
command == COM_STMT_CLOSE ||
command == COM_STMT_PREPARE);
command == COM_STMT_CLOSE);
}
#endif /* WITH_WSREP */
#ifndef EMBEDDED_LIBRARY
@@ -2402,13 +2401,23 @@ resume:
{
DEBUG_SYNC(thd, "wsrep_at_dispatch_end_before_result");
}
wsrep_after_command_before_result(thd);
if (wsrep_current_error(thd) && !wsrep_command_no_result(command))
if (thd->wsrep_cs().state() == wsrep::client_state::s_exec)
{
/* 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");
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))
{