MXS-1886 Auto-failover error tolerance

Contains changes from commit 9e68d8ec3ddf1621f533067021c4b3042f695e80
adapted to the 2.3 branch.
This commit is contained in:
Esa Korhonen
2018-06-15 15:59:35 +03:00
parent 72bfc73706
commit d3e9cc9a4f
5 changed files with 63 additions and 30 deletions

View File

@ -520,13 +520,12 @@ json_t* MariaDBServer::diagnostics_json(bool multimaster) const
return srv;
}
bool MariaDBServer::uses_gtid(json_t** error_out)
bool MariaDBServer::uses_gtid(std::string* error_out)
{
bool using_gtid = !m_slave_status.empty() && !m_slave_status[0].gtid_io_pos.empty();
if (!using_gtid)
{
string slave_not_gtid_msg = string("Slave server ") + name() + " is not using gtid replication.";
PRINT_MXS_JSON_ERROR(error_out, "%s", slave_not_gtid_msg.c_str());
*error_out = string("Slave server ") + name() + " is not using gtid replication.";
}
return using_gtid;
}