From ece5fff44e6ccdfdf2f54387fd62314d93ee1fb2 Mon Sep 17 00:00:00 2001 From: "gkodinov/kgeorge@mysql.com/macbook.gmz" <> Date: Fri, 7 Jul 2006 17:27:11 +0300 Subject: [PATCH] Bug #20569 Garbage in DECIMAL results from some mathematical functions * portability fix: moved the macro call after the C declaration --- strings/decimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/decimal.c b/strings/decimal.c index ecd92a54cc9..5a0bc0968b6 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -170,8 +170,8 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={ #define ADD(to, from1, from2, carry) /* assume carry <= 1 */ \ do \ { \ - DBUG_ASSERT((carry) <= 1); \ dec1 a=(from1)+(from2)+(carry); \ + DBUG_ASSERT((carry) <= 1); \ if (((carry)= a >= DIG_BASE)) /* no division here! */ \ a-=DIG_BASE; \ (to)=a; \