summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-10-15 14:18:26 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-10-15 14:18:26 +0500
commit3e7e78d7fce2fb97eab3df29c3e3f26c9b72a1be (patch)
tree0ed6b03ac1969ee268d0c3d3cd4ec75252bd84fd /strings
parent4ecb2aa4ebcca44cc9eec639e2d82a66bebb7fd2 (diff)
parent60761a7cc67a358861e4af7863b785adc449b92f (diff)
downloadmariadb-git-3e7e78d7fce2fb97eab3df29c3e3f26c9b72a1be.tar.gz
Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31019
into gleb.loc:/home/uchum/work/bk/5.1-opt mysql-test/r/type_decimal.result: Auto merged strings/decimal.c: Auto merged
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index f1753c619d1..f457014b2b1 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -2329,11 +2329,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++;
}