Skip to content

Commit

Permalink
MDEV-24872 : galera.galera_insert_multi MTR failed: crash with SIGABRT
Browse files Browse the repository at this point in the history
Problem was that we tried to lock THD::LOCK_thd_data after we have
acquired lock_sys mutex. This is against mutex ordering rules.
  • Loading branch information
Jan Lindström committed Feb 17, 2021
1 parent 4d300ab commit 45e33e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sql/sql_class.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4733,11 +4733,13 @@ thd_need_ordering_with(const MYSQL_THD thd, const MYSQL_THD other_thd)
#ifdef WITH_WSREP
/* wsrep applier, replayer and TOI processing threads are ordered
by replication provider, relaxed GAP locking protocol can be used
between high priority wsrep threads
between high priority wsrep threads. Note that this function
is called while holding lock_sys mutex, therefore we can't
use THD::LOCK_thd_data mutex below to follow mutex ordering rules.
*/
if (WSREP_ON &&
wsrep_thd_is_BF(const_cast<THD *>(thd), false) &&
wsrep_thd_is_BF(const_cast<THD *>(other_thd), true))
wsrep_thd_is_BF(const_cast<THD *>(other_thd), false))
return 0;
#endif /* WITH_WSREP */
rgi= thd->rgi_slave;
Expand Down

0 comments on commit 45e33e0

Please sign in to comment.