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

Merge 11.2 into 11.4

This commit is contained in:
Marko Mäkelä
2024-10-03 14:32:14 +03:00
560 changed files with 5796 additions and 1398 deletions

View File

@@ -9220,8 +9220,27 @@ static
void sql_kill(THD *thd, my_thread_id id, killed_state state, killed_type type)
{
#ifdef WITH_WSREP
if (WSREP(thd))
{
if (!(thd->variables.option_bits & OPTION_GTID_BEGIN))
{
WSREP_DEBUG("implicit commit before KILL");
/* Commit the normal transaction if one is active. */
bool commit_failed= trans_commit_implicit(thd);
/* Release metadata locks acquired in this transaction. */
thd->release_transactional_locks();
if (commit_failed || wsrep_after_statement(thd))
{
WSREP_DEBUG("implicit commit failed, MDL released: %lld",
(longlong) thd->thread_id);
return;
}
thd->transaction->stmt.mark_trans_did_ddl();
}
}
bool wsrep_high_priority= false;
#endif
#endif /* WITH_WSREP */
uint error= kill_one_thread(thd, id, state, type
#ifdef WITH_WSREP
, wsrep_high_priority
@@ -9253,6 +9272,26 @@ sql_kill_user(THD *thd, LEX_USER *user, killed_state state)
{
uint error;
ha_rows rows;
#ifdef WITH_WSREP
if (WSREP(thd))
{
if (!(thd->variables.option_bits & OPTION_GTID_BEGIN))
{
WSREP_DEBUG("implicit commit before KILL");
/* Commit the normal transaction if one is active. */
bool commit_failed= trans_commit_implicit(thd);
/* Release metadata locks acquired in this transaction. */
thd->release_transactional_locks();
if (commit_failed || wsrep_after_statement(thd))
{
WSREP_DEBUG("implicit commit failed, MDL released: %lld",
(longlong) thd->thread_id);
return;
}
thd->transaction->stmt.mark_trans_did_ddl();
}
}
#endif /* WITH_WSREP */
switch (error= kill_threads_for_user(thd, user, state, &rows))
{
case 0: