Fix server usage bugs in monitors and servers
The MySQL Monitor did not reset the pointer to the root master reference which would lead to a crash if the master was removed. When service details were shown, it listed all servers that existed. Only servers that haven't been removed or destroyed should be shown.
This commit is contained in:
@ -270,7 +270,6 @@ startMonitor(MONITOR *monitor, const CONFIG_PARAMETER* params)
|
||||
handle->replicationHeartbeat = 0;
|
||||
handle->detectStaleMaster = true;
|
||||
handle->detectStaleSlave = true;
|
||||
handle->master = NULL;
|
||||
handle->script = NULL;
|
||||
handle->multimaster = false;
|
||||
handle->mysql51_replication = false;
|
||||
@ -281,6 +280,9 @@ startMonitor(MONITOR *monitor, const CONFIG_PARAMETER* params)
|
||||
spinlock_init(&handle->lock);
|
||||
}
|
||||
|
||||
/** This should always be reset to NULL */
|
||||
handle->master = NULL;
|
||||
|
||||
while (params)
|
||||
{
|
||||
if (!strcmp(params->name, "detect_stale_master"))
|
||||
|
Reference in New Issue
Block a user