From 57726c16fdd45b684ef6e63217400b5228e2ca3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 4 Feb 2021 20:46:00 +0000 Subject: [PATCH] Closes #3288: Added extra logging to 'monitor_replication_lag_thread' to reflect when 'Seconds_Behind_Master' is NULL --- lib/MySQL_Monitor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index ef93e270d..e79dc52bd 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -2219,8 +2219,10 @@ __exit_monitor_replication_lag_thread: if (row) { repl_lag=-1; // this is old behavior repl_lag=mysql_thread___monitor_slave_lag_when_null; // new behavior, see 669 - if (row[j]) { // if Seconds_Behind_Master is not NULL + if (row[j]) { // if Seconds_Behind_Master is not NULL repl_lag=atoi(row[j]); + } else { + proxy_error("Replication lag on server %s:%d is NULL, using the value %d (mysql-monitor_slave_lag_when_null)\n", mmsd->hostname, mmsd->port, mysql_thread___monitor_slave_lag_when_null); } } }