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:
Esa Korhonen
2018-03-27 16:51:30 +03:00
parent 3be2ee8b28
commit 6c32c7421b

View File

@ -4564,7 +4564,7 @@ static void read_server_variables(MXS_MONITORED_SERVER* database, MySqlServerInf
if (serv_info->version == MYSQL_SERVER_VERSION_100)
{
query.erase(query.end() - 1);
query += ", @@gtid_domain_id;";
query += ", @@global.gtid_domain_id;";
columns = 3;
}