From fb832641c340e528677d8e90f419303e8ae13fd0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2005 13:49:37 +0400 Subject: 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 --- strings/decimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings/decimal.c') 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); } -- cgit v1.2.1