mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
Merge pilot.mysql.com:/data/msvensson/mysql/bug11589/my50-test_latest
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint libmysql/libmysql.c: Auto merged mysql-test/r/type_float.result: Manual merge mysql-test/t/type_float.test: Manual merge
This commit is contained in:
commit
13afffd03b
3 changed files with 41 additions and 1 deletions
|
|
@ -3876,7 +3876,15 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
sprintf(buff, "%.*f", (int) field->decimals, value);
|
||||
end= strend(buff);
|
||||
}
|
||||
fetch_string_with_conversion(param, buff, (uint) (end - buff));
|
||||
uint length= (uint) (end-buff);
|
||||
if (field->flags & ZEROFILL_FLAG && length < field->length &&
|
||||
field->length < MAX_DOUBLE_STRING_REP_LENGTH-1)
|
||||
{
|
||||
bmove_upp((char*) buff+field->length,buff+length, length);
|
||||
bfill((char*) buff, field->length - length,'0');
|
||||
length= field->length;
|
||||
}
|
||||
fetch_string_with_conversion(param, buff, length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue