MXS-1937 Cleanup event handling

Event handling is now enabled by default. If the monitor cannot query the EVENTS-
table (most likely because of missing credentials), print an error suggesting to
turn the feature off.

When disabling events on a rejoining standalone server (likely a former master),
disable binlog event recording for the session. This prevents the ALTER EVENT
queries from generating binlog events.

Also added documentation and combined similar parts in the code.
This commit is contained in:
Esa Korhonen
2018-09-11 14:22:36 +03:00
parent 4ba0112668
commit cb54880b99
6 changed files with 226 additions and 140 deletions

View File

@ -42,6 +42,7 @@
extern const int64_t SERVER_ID_UNKNOWN;
extern const int64_t GTID_DOMAIN_UNKNOWN;
extern const int PORT_UNKNOWN;
extern const char* const CN_HANDLE_EVENTS;
// Helper class for concatenating strings with a delimiter.
class DelimitedPrinter