Fix crashes when number of servers is more than half the value of monitor 'ping|read_only' intervals

pull/3973/head
Javier Jaramago Fernández 4 years ago
parent 7d9e2e8e7e
commit 6e5678315d

@ -2655,6 +2655,7 @@ void * MySQL_Monitor::monitor_ping() {
int us=100;
if (resultset->rows_count) {
us=mysql_thread___monitor_ping_interval/2/resultset->rows_count;
us = us == 0 ? 1 : us;
us*=40;
if (us > 1000000) {
us = 10000;
@ -2926,6 +2927,7 @@ void * MySQL_Monitor::monitor_read_only() {
int us=100;
if (resultset->rows_count) {
us=mysql_thread___monitor_read_only_interval/2/resultset->rows_count;
us = us == 0 ? 1 : us;
us*=40;
if (us > 1000000) {
us = 10000;

Loading…
Cancel
Save