diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-02-24 13:30:35 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-02-24 14:01:57 +0200 |
commit | f2428b9c247a7c1d369a5b962108775eb191ec8d (patch) | |
tree | cbe80d5f2af59e8fe10d22711127c24ad77a8e3e | |
parent | 2628fa2dba31a779b9bfc12bbcce0210e97f8c56 (diff) | |
download | mariadb-git-f2428b9c247a7c1d369a5b962108775eb191ec8d.tar.gz |
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.
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 7ca9e83a368..5746ac703f6 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -18598,10 +18598,12 @@ 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) { - trx_mutex_enter(trx); - lock_cancel_waiting_and_release(lock); - trx_mutex_exit(trx); + /* 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); } goto ret1; } |