MXS-1746 Query global gtid_domain_id instead of session-specific value
The monitor queried the session-specific domain id, which does not follow the global value while the session is alive. This caused the monitor to follow the wrong gtid domain if the domain was changed after MaxScale was started. This patch modifies the query to read the global value instead. Even this is not fool-proof, as existing sessions can issue writes with the old domain, confusing the gtid-parsing.
This commit is contained in:
@ -4564,7 +4564,7 @@ static void read_server_variables(MXS_MONITORED_SERVER* database, MySqlServerInf
|
|||||||
if (serv_info->version == MYSQL_SERVER_VERSION_100)
|
if (serv_info->version == MYSQL_SERVER_VERSION_100)
|
||||||
{
|
{
|
||||||
query.erase(query.end() - 1);
|
query.erase(query.end() - 1);
|
||||||
query += ", @@gtid_domain_id;";
|
query += ", @@global.gtid_domain_id;";
|
||||||
columns = 3;
|
columns = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user