From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/123084-patch-check_mysql.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 web/attachments/123084-patch-check_mysql.c (limited to 'web/attachments/123084-patch-check_mysql.c') diff --git a/web/attachments/123084-patch-check_mysql.c b/web/attachments/123084-patch-check_mysql.c new file mode 100644 index 0000000..998ad47 --- /dev/null +++ b/web/attachments/123084-patch-check_mysql.c @@ -0,0 +1,20 @@ +--- plugins/check_mysql.c.orig Sun Dec 26 00:17:44 2004 ++++ plugins/check_mysql.c Sun Feb 20 14:12:10 2005 +@@ -123,8 +123,16 @@ + die (STATE_CRITICAL, "%s\n", slaveresult); + } + ++ } else if (mysql_field_count (&mysql) == 33) { ++ /* mysql >= 4.1.1 */ ++ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[10], row[11]); ++ if (strcmp (row[10], "Yes") != 0 || strcmp (row[11], "Yes") != 0) { ++ mysql_free_result (res); ++ mysql_close (&mysql); ++ die (STATE_CRITICAL, "%s\n", slaveresult); ++ } + } else { +- /* mysql 4.x.x */ ++ /* mysql 4.0.x or 4.1.0 */ + snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[9], row[10]); + if (strcmp (row[9], "Yes") != 0 || strcmp (row[10], "Yes") != 0) { + mysql_free_result (res); -- cgit v1.2.3-74-g34f1