MDEV-24967 : Signal 11 on ha_innodb.cc::bg_wsrep_kill_trx line 18611

Null poiter reference in case where bf_thd has no trx .e.g. when
we have MDL-conflict.
This commit is contained in:
Jan Lindström 2021-02-24 13:30:35 +02:00
commit f2428b9c24

View file

@ -18598,7 +18598,9 @@ static void bg_wsrep_kill_trx(void *void_arg)
/* apparently victim trx was meanwhile rolled back.
tell bf thd not to wait, in case it already started to */
trx_t *trx= thd_to_trx(bf_thd);
if (lock_t *lock= trx->lock.wait_lock) {
/* note that bf_thd might not have trx e.g. in case of
MDL-conflict. */
if (lock_t *lock= (trx ? trx->lock.wait_lock : NULL)) {
trx_mutex_enter(trx);
lock_cancel_waiting_and_release(lock);
trx_mutex_exit(trx);