MXS-1678: Store master_id even when IO thread is stopped

When the IO thread of a relay master is stopped, the knowledge that it is
not a real master but a relay master is lost. To prevent this loss of
information, the master server's server_id value should always be stored
if it is available.
This commit is contained in:
Markus Mäkelä 2018-02-21 09:35:42 +02:00
parent f3e00431de
commit 1ecd791887
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -457,7 +457,7 @@ static inline void monitor_mysql_db(MXS_MONITOR_SERVERS* database, MYSQL_SERVER_
* root master server.
* Please note, there could be no slaves at all if Slave_SQL_Running == 'No'
*/
if (serv_info->slave_io && server_version != MYSQL_SERVER_VERSION_51)
if (server_version != MYSQL_SERVER_VERSION_51)
{
/* Get Master_Server_Id */
master_id = atol(row[i_master_id]);