Fix to MXS-439: Weightby value of 0 no longer causes a crash
A weightby parameter with a value of 0 no longer causes SIGFPE and the invalid weight value is set to the correct value of 1.
This commit is contained in:
parent
0aa38cad4c
commit
02da87f737
@ -665,10 +665,7 @@ createInstance(SERVICE *service, char **options)
|
||||
|
||||
if (perc == 0)
|
||||
{
|
||||
if (wght != 0)
|
||||
{
|
||||
perc = 1;
|
||||
}
|
||||
perc = 1;
|
||||
MXS_ERROR("Weighting parameter '%s' with a value of %d for"
|
||||
" server '%s' rounds down to zero with total weight"
|
||||
" of %d for service '%s'. No queries will be "
|
||||
|
Loading…
x
Reference in New Issue
Block a user