From 4e007e87d01b431f82defda90f42f832daab0ebb Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Wed, 16 Nov 2016 22:59:47 +0200 Subject: [PATCH] Allow stale master status to be assigned via maxadmin If a master once had slaves and is in the stale status, it will not retain this status after a restart. Without storing on-disk information, the stale master status cannot be deduced by looking at the master alone. Because of this, the user should be able to manually enable the stale master status. --- Documentation/Reference/MaxAdmin.md | 4 ++++ server/core/server.c | 1 + 2 files changed, 5 insertions(+) diff --git a/Documentation/Reference/MaxAdmin.md b/Documentation/Reference/MaxAdmin.md index c1da5453e..6120c779e 100644 --- a/Documentation/Reference/MaxAdmin.md +++ b/Documentation/Reference/MaxAdmin.md @@ -520,6 +520,10 @@ The status bit that can be controlled are maintenance The server is in maintenance mode. In this mode no new connections will be established to the server. The monitors will also not monitor servers that are in maintenance mode. + + stale + The server is a stale master server. Read [MySQL Monitor](../Monitors/MySQL-Monitor.md) documentation for more details. + diff --git a/server/core/server.c b/server/core/server.c index 8de58eb5d..1517c566f 100644 --- a/server/core/server.c +++ b/server/core/server.c @@ -990,6 +990,7 @@ static struct { "ndb", SERVER_NDB }, { "maintenance", SERVER_MAINT }, { "maint", SERVER_MAINT }, + { "stale", SERVER_STALE_STATUS }, { NULL, 0 } };