From dd4e104011a8134b5b34d7aaa37726414b02d1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 3 Apr 2019 01:18:26 +1100 Subject: [PATCH] More error handling in Monitor --- lib/MySQL_Monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 52ef73b4a..e693f6139 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -1498,7 +1498,7 @@ __exit_monitor_replication_lag_thread: int j=-1; num_fields = mysql_num_fields(mmsd->result); fields = mysql_fetch_fields(mmsd->result); - if (fields) { + if (fields && num_fields == 1) { for(k = 0; k < num_fields; k++) { if (strcmp("Seconds_Behind_Master", fields[k].name)==0) { j=k;