MXS-1156: Added new option MASTER_HEARTBEAT_PERIOD to CHANGE MASTER TO

MXS-1156: Added new option MASTER_HEARTBEAT_PERIOD to CHANGE MASTER TO
This commit is contained in:
MassimilianoPinto
2017-08-25 15:24:10 +02:00
parent 68b7d88fa1
commit 5b2cfac3cb
3 changed files with 131 additions and 24 deletions

View File

@ -647,11 +647,14 @@ createInstance(SERVICE *service, char **options)
{
int h_val = (int)strtol(value, NULL, 10);
if (h_val <= 0 || (errno == ERANGE))
if (h_val <= 0 ||
(errno == ERANGE) ||
h_val > BLR_HEARTBEAT_MAX_INTERVAL)
{
MXS_WARNING("Invalid heartbeat period %s."
" Setting it to default value %ld.",
value, inst->heartbeat);
value,
inst->heartbeat);
}
else
{