diff options
author | unknown <holyfoot@deer.(none)> | 2005-11-03 13:49:37 +0400 |
---|---|---|
committer | unknown <holyfoot@deer.(none)> | 2005-11-03 13:49:37 +0400 |
commit | fb832641c340e528677d8e90f419303e8ae13fd0 (patch) | |
tree | 202920c36e4c0220cee6dae6fa88b9b69b440d95 /strings/decimal.c | |
parent | d8fa981918d0a98fb83db4733542a61312fbff6c (diff) | |
download | mariadb-git-fb832641c340e528677d8e90f419303e8ae13fd0.tar.gz |
Fix for bug #14268 (Bad FLOAT->DECIMAL conversion)
mysql-test/r/type_newdecimal.result:
test result updated
mysql-test/t/type_newdecimal.test:
test case added
strings/decimal.c:
i think that gives the proper precision
Diffstat (limited to 'strings/decimal.c')
-rw-r--r-- | strings/decimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index ea6ac2caf38..2fff4d75449 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -973,7 +973,7 @@ int double2decimal(double from, decimal_t *to) { /* TODO: fix it, when we'll have dtoa */ char s[400], *end; - sprintf(s, "%f", from); + sprintf(s, "%.16G", from); end= strend(s); return string2decimal(s, to, &end); } |