Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#8 Result of float formatting is different from sprintf

open
nobody
MySQL (5)
5
2008-05-06
2008-05-06
Petteri Muilu
No

Bug in a Open C's sprinf() function:

Test case: sprintf(to,"%g",12345.10 );
Result: 12345
Expected result: 12345.1

Alternative implementation for this is available but it gives too many decimals instead of one so test_bug4172 fails because of this. Shouldn't be problem with mysql clients though.

As soon as fixed to Open C, alternative implementation can be removed.

File: field.cc:3880

Discussion