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
commit1571f06196072930b6bcf3d77eeae3cbe4a3611b (patch)
treebdffa8e5d8194b81855bad072fe9eb7827c64d02 /libmysql
parent0888d7c0a8fdc72563d710cc3affa61ad2262c5c (diff)
parenta01946373d5752c921c4daddfec5c6cdfdbfa627 (diff)
downloadmariadb-git-1571f06196072930b6bcf3d77eeae3cbe4a3611b.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;
}