diff options
author | tsmith@quadxeon.mysql.com <> | 2007-06-05 23:04:40 +0200 |
---|---|---|
committer | tsmith@quadxeon.mysql.com <> | 2007-06-05 23:04:40 +0200 |
commit | d2fe24d1ef367483ff6cf775f9f151734933bf32 (patch) | |
tree | be4ad3f767cede727abc63a97dde0d92d211f27b /strings | |
parent | 173d07de7806abfce4ccc51e6d16686b2e60dcd2 (diff) | |
parent | d9fcc304d9b02b97bc259dc74d3b33f44885258d (diff) | |
download | mariadb-git-d2fe24d1ef367483ff6cf775f9f151734933bf32.tar.gz |
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index 1ae75167794..f1f02f3a071 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1517,9 +1517,10 @@ decimal_round(decimal_t *from, decimal_t *to, int scale, dec1 *p0= buf0+intg0+max(frac1, frac0); dec1 *p1= buf1+intg1+max(frac1, frac0); - to->buf[0]= 0; while (buf0 < p0) *(--p1) = *(--p0); + if (unlikely(intg1 > intg0)) + to->buf[0]= 0; intg0= intg1; buf0=to->buf; |