Fix syntax error build problem on Windows (variable was defined

in middle of block)
This commit is contained in:
tsmith@ramayana.hindu.god 2007-10-17 11:22:41 -06:00
parent 63ae0223b1
commit 3d203e55e6

View File

@ -3876,7 +3876,9 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
sprintf(buff, "%.*f", (int) field->decimals, value);
end= strend(buff);
}
uint length= (uint) (end-buff);
{
size_t length= end - buff;
if (field->flags & ZEROFILL_FLAG && length < field->length &&
field->length < MAX_DOUBLE_STRING_REP_LENGTH - 1)
{
@ -3885,6 +3887,8 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
length= field->length;
}
fetch_string_with_conversion(param, buff, length);
}
break;
}
}