summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorkaa@polly.(none) <>2007-12-01 15:25:24 +0300
committerkaa@polly.(none) <>2007-12-01 15:25:24 +0300
commit55acce750486f557b84610ce63545511aca89bed (patch)
treeef0425d76948e8696f54c69d42e7d37d7a11c274 /sql/field.cc
parent33125cd40ed2b92ee923c63bd81e153e0f5bc92c (diff)
downloadmariadb-git-55acce750486f557b84610ce63545511aca89bed.tar.gz
Fixed the floating point number tests on Windows.
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 1878797297f..a9aca5dc6e0 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -5954,7 +5954,7 @@ int Field_str::store(double nr)
if (exp >= (int) digits || exp < -4)
digits= max(0, (int) (max_length - 5 - (exp >= 100 || exp <= -100)));
- length= (uint) my_sprintf(buff, (buff, "%-.*g", digits, nr));
+ length= (uint) my_sprintf(buff, (buff, "%-.*g", min(digits, DBL_DIG ), nr));
#ifdef __WIN__
/*