MXS-2711: Fix updating of retain_last_statements

The value is now correctly expected to be a non-negative integer.
This commit is contained in:
Markus Mäkelä
2019-10-03 13:18:21 +03:00
parent 237cdd798b
commit 64d19cf018

View File

@ -894,10 +894,9 @@ bool runtime_alter_maxscale(const char* name, const char* value)
} }
else if (key == CN_RETAIN_LAST_STATEMENTS) else if (key == CN_RETAIN_LAST_STATEMENTS)
{ {
int intval = get_positive_int(value); if (is_valid_integer(value))
if (intval)
{ {
session_set_retain_last_statements(intval); session_set_retain_last_statements(atoi(value));
rval = true; rval = true;
} }
else else