Allow switchover for arbitrary topologies

The demoted server no longer needs to be the master.
This commit is contained in:
Esa Korhonen
2018-10-11 13:46:07 +03:00
parent 0cf8ea43f7
commit f554ef770b
2 changed files with 9 additions and 4 deletions

View File

@ -1505,7 +1505,7 @@ unique_ptr<ClusterOperation> MariaDBMonitor::switchover_prepare(SERVER* promotio
else
{
// Autoselect current master as demotion target.
if (m_master == NULL)
if (m_master == NULL || !m_master->is_master())
{
const char msg[] = "Can not autoselect a demotion target for switchover: cluster does "
"not have a master.";