MXS-2652 Do not clear maintenance flag when a server goes down

The set of flags to clear should be well-defined.
This commit is contained in:
Esa Korhonen
2019-08-30 18:14:04 +03:00
parent ea9a823a25
commit 00feb61b23
3 changed files with 8 additions and 10 deletions

View File

@ -379,9 +379,9 @@ void MariaDBMonitor::update_server(MariaDBServer* server)
}
else
{
/* The current server is not running. Clear all but the stale master bit as it is used to detect
* masters that went down but came up. */
server->clear_status(~SERVER_WAS_MASTER);
// The server is not running. Clear some of the bits. User-set bits and some long-term bits
// can stay.
server->clear_status(SERVER_DOWN_CLEAR_BITS);
auto conn_errno = mysql_errno(conn);
if (conn_errno == ER_ACCESS_DENIED_ERROR || conn_errno == ER_ACCESS_DENIED_NO_PASSWORD_ERROR)
{