Fix Auth Error server status
The mon_ping_or_connect_to_db resets the MYSQL handle which caused the loss of the error message. Returning a new enumeration value for authentication errors solves this problem.
This commit is contained in:
@ -382,8 +382,8 @@ void MariaDBMonitor::update_server(MariaDBServer* server)
|
||||
// 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)
|
||||
|
||||
if (conn_status == MONITOR_CONN_ACCESS_DENIED)
|
||||
{
|
||||
server->set_status(SERVER_AUTH_ERROR);
|
||||
}
|
||||
|
Reference in New Issue
Block a user