1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge 10.6 into 10.7

This commit is contained in:
Marko Mäkelä
2022-03-30 08:52:05 +03:00
122 changed files with 3604 additions and 723 deletions

View File

@ -1141,8 +1141,7 @@ static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
static bool wsrep_command_no_result(char command)
{
return (command == COM_STMT_PREPARE ||
command == COM_STMT_FETCH ||
return (command == COM_STMT_FETCH ||
command == COM_STMT_SEND_LONG_DATA ||
command == COM_STMT_CLOSE);
}
@ -1340,7 +1339,13 @@ dispatch_command_return do_command(THD *thd, bool blocking)
DBUG_ASSERT(!thd->mdl_context.has_locks());
DBUG_ASSERT(!thd->get_stmt_da()->is_set());
/* We let COM_QUIT and COM_STMT_CLOSE to execute even if wsrep aborted. */
if (command != COM_STMT_CLOSE &&
if (command == COM_STMT_EXECUTE)
{
WSREP_DEBUG("PS BF aborted at do_command");
thd->wsrep_delayed_BF_abort= true;
}
if (command != COM_STMT_CLOSE &&
command != COM_STMT_EXECUTE &&
command != COM_QUIT)
{
my_error(ER_LOCK_DEADLOCK, MYF(0));
@ -1423,6 +1428,17 @@ out:
if (unlikely(wsrep_service_started))
wsrep_after_command_after_result(thd);
}
if (thd->wsrep_delayed_BF_abort)
{
my_error(ER_LOCK_DEADLOCK, MYF(0));
WSREP_DEBUG("Deadlock error for PS query: %s", thd->query());
thd->reset_killed();
thd->mysys_var->abort = 0;
thd->wsrep_retry_counter = 0;
thd->wsrep_delayed_BF_abort= false;
}
#endif /* WITH_WSREP */
DBUG_RETURN(return_value);
}