From dbe417bdf9d4af8b6c07b9f04579a38231b783ed Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 26 Sep 2025 09:07:18 +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(-) diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 3d7ec4cd..062ec657 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -219,16 +219,13 @@ int 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