summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2f2f35)
raw | patch | inline | side by side (parent: f2f2f35)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Tue, 24 Mar 2009 06:01:48 +0000 (02:01 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Tue, 24 Mar 2009 06:01:48 +0000 (02:01 -0400) |
NEWS | patch | blob | history | |
THANKS.in | patch | blob | history | |
plugins/check_mysql.c | patch | blob | history |
index 164ef9fa6d6f948e817719b4468677bf7a6f7a0c..4f3a833e562bf292982bcc9f04d0bb360c3c1dfb 100644 (file)
--- a/NEWS
+++ b/NEWS
Fixed check_http not timing-out on redirects
Fixed negate not printing the real timeout in ALRM handler when left to default
negate timeout result is now configurable
+ Fixed segfault in check_mysql with old slaves (#2696823 - Oskar Ahner)
1.4.13 25th Sept 2008
Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
diff --git a/THANKS.in b/THANKS.in
index 7737e17ddfdc96f6333c23a1afa4a9240f9064f9..30bf06c2492e013f0a259a8fe3491d21b7319aa6 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Olli Hauer
Richard Edward Horner
John Barbuto
+Oskar Ahner
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 119ce0afa85681342086dff4c806f42010ca8705..689648eb843672d5632e828049b8c3a89826d530 100644 (file)
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
continue;
}
}
+
if ((slave_io_field < 0) || (slave_sql_field < 0) || (num_fields == 0)) {
mysql_free_result (res);
mysql_close (&mysql);
die (STATE_CRITICAL, "Slave status unavailable\n");
}
- snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s Seconds Behind Master: %s", row[slave_io_field], row[slave_sql_field], row[seconds_behind_field]);
+ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s Seconds Behind Master: %s", row[slave_io_field], row[slave_sql_field], seconds_behind_field!=-1?row[seconds_behind_field]:"Unknown");
if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) {
mysql_free_result (res);
mysql_close (&mysql);