MXS-2546 Save master server to slave connection object

Simplifies later checks and removes duplicate code. The "assume_unique_hostnames"-
setting is no longer required within the MariaDBServer-class.
This commit is contained in:
Esa Korhonen
2019-07-17 18:48:46 +03:00
parent 2a1925744b
commit 5df1f2561c
6 changed files with 39 additions and 53 deletions

View File

@ -239,8 +239,10 @@ public:
Settings settings; /* User-defined settings for the slave connection. */
bool seen_connected = false; /* Has this slave connection been seen connected,
* meaning that the master server id is correct? */
/* If the master is a monitored server, it's written here. */
const MariaDBServer* master_server {nullptr};
/* Has this slave connection been seen connected, meaning that the master server id is correct? */
bool seen_connected = false;
int64_t master_server_id = SERVER_ID_UNKNOWN; /* The master's server_id value. Valid ids are
* 32bit unsigned. -1 is unread/error. */
@ -320,8 +322,4 @@ public:
/* Should failover/switchover enable/disable any scheduled events on the servers during
* promotion/demotion? */
bool handle_event_scheduler {true};
// Miscellaneous settings
bool assume_unique_hostnames {true}; /**< Are server hostnames consistent between MaxScale and
* servers */
};
};