MXS-1446: Store last triggered event for each server

When an event occurs on a server, it is now stored so that the last event
for each server is known. This allows a state change to trigger an event
even if, at the time of the event, no action was taken.

This change is only cosmetic as no functionality is implemented.
This commit is contained in:
Markus Mäkelä
2017-09-25 15:29:27 +03:00
parent 1d2ba10a68
commit 3e1d89ff17
2 changed files with 16 additions and 4 deletions

View File

@ -163,13 +163,14 @@ typedef enum
*/
typedef struct monitor_servers
{
SERVER *server; /**< The server being monitored */
MYSQL *con; /**< The MySQL connection */
SERVER *server; /**< The server being monitored */
MYSQL *con; /**< The MySQL connection */
bool log_version_err;
int mon_err_count;
unsigned int mon_prev_status;
unsigned int pending_status; /**< Pending Status flag bitmap */
struct monitor_servers *next; /**< The next server in the list */
unsigned int pending_status; /**< Pending Status flag bitmap */
mxs_monitor_event_t last_event; /**< The last event that occurred on this server*/
struct monitor_servers *next; /**< The next server in the list */
} MXS_MONITOR_SERVERS;
/**