mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MW-286 Avoid spurious deadlock errors when wsrep_on is disabled
If a conflict happens under wsrep_on, the THD's wsrep_conflict_state is typically set to MUST_ABORT and cleared later, when transaction is aborted. However, when wsrep_on is disabled, no check is performed to see whether wsrep_conflict_state is set. So this potentially creates spurious deadlock errors on the subsequent statement that runs with wsrep_on enabled. To avoid this problem wsrep_thd_set_conflict_state() sets the conflict state only if wsrep_on is enabled.
This commit is contained in:
committed by
Nirbhay Choubey
parent
a12fa57d35
commit
88a1592b0a
@@ -846,7 +846,7 @@ extern "C" void wsrep_thd_set_query_state(
|
||||
extern "C" void wsrep_thd_set_conflict_state(
|
||||
THD *thd, enum wsrep_conflict_state state)
|
||||
{
|
||||
thd->wsrep_conflict_state= state;
|
||||
if (WSREP(thd)) thd->wsrep_conflict_state= state;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user