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

Merge 10.6 into 10.9

This commit is contained in:
Marko Mäkelä
2023-05-22 09:13:51 +03:00
37 changed files with 651 additions and 312 deletions

View File

@@ -1298,6 +1298,11 @@ void THD::init()
wsrep_affected_rows = 0;
m_wsrep_next_trx_id = WSREP_UNDEFINED_TRX_ID;
wsrep_aborter = 0;
wsrep_abort_by_kill = NOT_KILLED;
wsrep_abort_by_kill_err = 0;
#ifndef DBUG_OFF
wsrep_killed_state = 0;
#endif /* DBUG_OFF */
wsrep_desynced_backup_stage= false;
#endif /* WITH_WSREP */
@@ -1646,6 +1651,13 @@ void THD::reset_for_reuse()
#endif
#ifdef WITH_WSREP
wsrep_free_status(this);
wsrep_cs().reset_error();
wsrep_aborter= 0;
wsrep_abort_by_kill= NOT_KILLED;
wsrep_abort_by_kill_err= 0;
#ifndef DBUG_OFF
wsrep_killed_state= 0;
#endif /* DBUG_OFF */
#endif /* WITH_WSREP */
}
@@ -1902,7 +1914,9 @@ void THD::awake_no_mutex(killed_state state_to_set)
}
/* Interrupt target waiting inside a storage engine. */
if (state_to_set != NOT_KILLED && !wsrep_is_bf_aborted(this))
if (state_to_set != NOT_KILLED &&
IF_WSREP(!wsrep_is_bf_aborted(this) && wsrep_abort_by_kill == NOT_KILLED,
true))
ha_kill_query(this, thd_kill_level(this));
abort_current_cond_wait(false);
@@ -2129,6 +2143,17 @@ void THD::reset_killed()
mysql_mutex_unlock(&LOCK_thd_kill);
}
#ifdef WITH_WSREP
if (WSREP_NNULL(this))
{
if (wsrep_abort_by_kill != NOT_KILLED)
{
mysql_mutex_assert_not_owner(&LOCK_thd_kill);
mysql_mutex_lock(&LOCK_thd_kill);
wsrep_abort_by_kill= NOT_KILLED;
wsrep_abort_by_kill_err= 0;
mysql_mutex_unlock(&LOCK_thd_kill);
}
}
mysql_mutex_assert_not_owner(&LOCK_thd_data);
mysql_mutex_lock(&LOCK_thd_data);
wsrep_aborter= 0;