From 291a704bcf738f6ceb7a1f46c69b8332b33dbd70 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 26 Sep 2025 08:57:19 +0200 Subject: check_mysql: Assume MySQL server by default (in replica check) In the Debian Bug tracker (and then Github) a person pointed out, that a MySQL server does not respond with a hint that is indeed the MySQL software, but only with the version string. Which makes sense if one assumes to be the only implementation. This commit changes the behaviour of the Replica check to assume that the counterpart is a MySQL server if there are not hints that it is a MariaDB server. --- plugins/check_mysql.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 1b7403f7..951a96f9 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -239,16 +239,13 @@ main (int argc, char **argv) use_deprecated_slave_status = true; } } - } else if (strstr(server_version, "MySQL") != NULL) { - // Looks like MySQL + } else { + // Looks like MySQL (or at least not like MariaDB) if (major_version < 8) { use_deprecated_slave_status = true; } else if (major_version == 10 && minor_version < 4) { use_deprecated_slave_status = true; } - } else { - printf("Not a known sever implementation: %s\n", server_version); - exit(STATE_UNKNOWN); } char *replica_query = NULL; -- cgit v1.2.3-74-g34f1