From 12d91871b7ccbfcaab6a952c8d65d4574fc4789d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 9 Jul 2021 16:19:44 +0200 Subject: [PATCH] Fixed possible floating point exception in 'monitor_read_only' --- 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 e91fda825..89856dbc4 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -2809,7 +2809,7 @@ void * MySQL_Monitor::monitor_read_only() { if (resultset->rows_count) { us=mysql_thread___monitor_read_only_interval/2/resultset->rows_count; us*=40; - if (us > 1000000) { + if (us > 1000000 || us <= 0) { us = 10000; } us = us + rand()%us;