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:
@ -665,10 +665,7 @@ createInstance(SERVICE *service, char **options)
|
|||||||
|
|
||||||
if (perc == 0)
|
if (perc == 0)
|
||||||
{
|
{
|
||||||
if (wght != 0)
|
perc = 1;
|
||||||
{
|
|
||||||
perc = 1;
|
|
||||||
}
|
|
||||||
MXS_ERROR("Weighting parameter '%s' with a value of %d for"
|
MXS_ERROR("Weighting parameter '%s' with a value of %d for"
|
||||||
" server '%s' rounds down to zero with total weight"
|
" server '%s' rounds down to zero with total weight"
|
||||||
" of %d for service '%s'. No queries will be "
|
" of %d for service '%s'. No queries will be "
|
||||||
|
|||||||
Reference in New Issue
Block a user