mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-10653: Fix segfault in SHOW MASTER STATUS with NULL inuse_relaylog
The previous patch for MDEV-10653 changes the rpl_parallel::workers_idle() function to use Relay_log_info::last_inuse_relaylog to check for idle workers. But the code was missing a NULL check. Also, there was one place during SQL slave thread start which was missing mutex synchronisation when updating inuse_relaylog. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@ -2538,8 +2538,10 @@ rpl_parallel::stop_during_until()
|
||||
bool
|
||||
rpl_parallel::workers_idle(Relay_log_info *rli)
|
||||
{
|
||||
return rli->last_inuse_relaylog->queued_count ==
|
||||
rli->last_inuse_relaylog->dequeued_count;
|
||||
mysql_mutex_assert_owner(&rli->data_lock);
|
||||
return !rli->last_inuse_relaylog ||
|
||||
rli->last_inuse_relaylog->queued_count ==
|
||||
rli->last_inuse_relaylog->dequeued_count;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user