diff options
author | gluh@eagle.(none) <> | 2007-10-23 18:51:43 +0500 |
---|---|---|
committer | gluh@eagle.(none) <> | 2007-10-23 18:51:43 +0500 |
commit | 237383f0fecd267d702b92713d49b0f9b2c78746 (patch) | |
tree | d36465f86e78c442a44942849b7280eab8d10bf8 /strings | |
parent | 9732efe7f8970626840cf64628ab75f83eee5523 (diff) | |
parent | d0f53297f6acffecb75845fdc03df35c6956efbc (diff) | |
download | mariadb-git-237383f0fecd267d702b92713d49b0f9b2c78746.tar.gz |
Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
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 f1f02f3a071..cbea0e340c6 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -2323,11 +2323,12 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2, } if (unlikely(intg0+frac0 > to->len)) { - stop1-=to->len-frac0-intg0; + stop1-=frac0+intg0-to->len; frac0=to->len-intg0; to->frac=frac0*DIG_PER_DEC1; error=E_DEC_TRUNCATED; } + DBUG_ASSERT(buf0 + (stop1 - start1) <= to->buf + to->len); while (start1 < stop1) *buf0++=*start1++; } |