summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-06-15 19:07:11 +0500
committerunknown <hf@deer.(none)>2005-06-15 19:07:11 +0500
commitba36aabce494b9027a0019afad0cfa955a0214bb (patch)
tree6fd8ffca91d04be2e3c7c0b826e5655ba01c32dd /strings
parentf0091240f37a30edb59e497c5d41409eb11e4a13 (diff)
parent2d30c8fd5350b3bf3ca47686587b54b37b148eef (diff)
downloadmariadb-git-ba36aabce494b9027a0019afad0cfa955a0214bb.tar.gz
Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.10337 strings/decimal.c: Auto merged
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 8d07a84ede1..de64933466d 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1563,7 +1563,13 @@ decimal_round(decimal_t *from, decimal_t *to, int scale,
break;
if (buf1-- == to->buf)
{
- decimal_make_zero(to);
+ /* making 'zero' with the proper scale */
+ dec1 *p0= to->buf + frac0 + 1;
+ to->intg=1;
+ to->frac= max(scale, 0);
+ to->sign= 0;
+ for (buf1= to->buf; buf1<p0; buf1++)
+ *buf1= 0;
return E_DEC_OK;
}
}