summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-11-01 11:31:17 +0100
committerserg@serg.mylan <>2004-11-01 11:31:17 +0100
commite933ae7dd2b95d560d4b36057da0a6db042dde12 (patch)
tree9babafea8ea3510c64858534dc8e807e1b09c2cf /strings
parent2323a3dc9c0f08136710c5f811329b61e54c237b (diff)
parent9820e00cba4f1c63860359de2339b1134b1127e9 (diff)
downloadmariadb-git-e933ae7dd2b95d560d4b36057da0a6db042dde12.tar.gz
Merge bk-internal:/home/bk/mysql-5.0/
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 5fa24a4c8a6..a6c53f3a130 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1060,6 +1060,10 @@ static int do_sub(decimal *from1, decimal *from2, decimal *to)
carry=1;
else if (intg2 == intg1)
{
+ while (unlikely(stop1[frac1-1] == 0))
+ frac1--;
+ while (unlikely(stop2[frac2-1] == 0))
+ frac2--;
while (buf1 < stop1+frac1 && buf2 < stop2+frac2 && *buf1 == *buf2)
buf1++, buf2++;
if (buf1 < stop1+frac1)