Check monitor permissions when reconnecting to server

Previously, the permissions would only be checked at monitor start.
Now, the permissions are checked if [Auth Error] is on or server
was reconnected.
This commit is contained in:
Esa Korhonen
2018-06-18 16:23:49 +03:00
parent 396f5d96c2
commit 8bd9e1d473
3 changed files with 88 additions and 25 deletions

View File

@ -151,7 +151,8 @@ public:
MariaDBServer(MXS_MONITORED_SERVER* monitored_server, int config_index);
void monitor_server();
void update_server_info();
void update_server_version();
void check_permissions();
/**
* Calculate how many events are left in the relay log.
@ -261,6 +262,22 @@ public:
*/
bool is_relay_server() const;
/**
* Check if server has the given bits on in 'pending_status'.
*
* @param bits Bits to check
* @return True if all given bits are on
*/
bool has_status(uint64_t bits) const;
/**
* Check if server has the given bits on in 'mon_prev_status'.
*
* @param bits Bits to check
* @return True if all given bits are on
*/
bool had_status(uint64_t bits) const;
/**
* Getter for m_read_only.
*