Store capabilities of monitored server

Checking the version number in various places in the code gets confusing.
It's better to check the version in one place and record the relevant data.
This commit is contained in:
Esa Korhonen
2018-11-19 16:11:32 +02:00
parent 01628dd0de
commit fb52e565fe
5 changed files with 78 additions and 68 deletions

View File

@ -654,7 +654,7 @@ void MariaDBMonitor::assign_slave_and_relay_master(MariaDBServer* start_node)
}
// If the node is a binlog relay, remove any slave bits that may have been set.
// Relay master bit can stay.
if (parent->m_version == MariaDBServer::version::BINLOG_ROUTER)
if (parent->m_srv_type == MariaDBServer::server_type::BINLOG_ROUTER)
{
parent->clear_status(SERVER_SLAVE);
}