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
commit04ec8eca81e420e7a0939b436757606f2fbc76c4 (patch)
tree6fd8ffca91d04be2e3c7c0b826e5655ba01c32dd /strings
parent7fdcb69b81cd4b49781da18adc8f5288bbe8322d (diff)
parente4cdb19387508ebe22bffb174d3efe6f5e4b135f (diff)
downloadmariadb-git-04ec8eca81e420e7a0939b436757606f2fbc76c4.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;
}
}