summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-10 16:27:35 +0300
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-10 16:27:35 +0300
commitebe2f795c0f1d3e2153c036682e5d555d39529d5 (patch)
treebdffa8e5d8194b81855bad072fe9eb7827c64d02 /libmysql
parent6429ea15a3c0fcd689146d109ee8608490fef1c2 (diff)
parentcdac80a93a20b81232a1f1d0bc95abaead4505c5 (diff)
downloadmariadb-git-ebe2f795c0f1d3e2153c036682e5d555d39529d5.tar.gz
Merge into dev tree.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index ca329eadf0f..e84e79fc89e 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3833,13 +3833,13 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
#undef NOT_FIXED_DEC
{
/*
- The 14 below is to ensure that the server and client has the same
+ DBL_DIG below is to ensure that the server and client has the same
precisions. This will ensure that on the same machine you get the
same value as a string independent of the protocol you use.
*/
sprintf(buff, "%-*.*g", (int) min(sizeof(buff)-1,
param->buffer_length),
- min(14,width), value);
+ min(DBL_DIG, width), value);
end= strcend(buff, ' ');
*end= 0;
}