Commit ec6832ce authored by hf@deer.(none)'s avatar hf@deer.(none)

Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1

into deer.(none):/home/hf/work/mysql-4.1.5371
parents 84aec2fa f8aff993
...@@ -3487,10 +3487,11 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field, ...@@ -3487,10 +3487,11 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
char *end; char *end;
/* TODO: move this to a header shared between client and server. */ /* TODO: move this to a header shared between client and server. */
#define NOT_FIXED_DEC 31 #define NOT_FIXED_DEC 31
if (field->decimals >= 31) if (field->decimals >= NOT_FIXED_DEC)
#undef NOT_FIXED_DEC #undef NOT_FIXED_DEC
{ {
sprintf(buff, "%-*.*g", (int) param->buffer_length, width, value); sprintf(buff, "%-*.*g", (int) min(sizeof(buff)-1, param->buffer_length),
width, value);
end= strcend(buff, ' '); end= strcend(buff, ' ');
*end= 0; *end= 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment