summaryrefslogtreecommitdiff
path: root/strings/decimal.c
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-02-13 01:36:35 +0400
committerunknown <hf@deer.(none)>2005-02-13 01:36:35 +0400
commita0d5302e170ce48d6b3f3f7e640cf5d58acb8912 (patch)
tree88d32c9f7e4c462f1cb244b986c563274d878a53 /strings/decimal.c
parent4adab48b6c412b3104044c740c013e020787c2e2 (diff)
downloadmariadb-git-a0d5302e170ce48d6b3f3f7e640cf5d58acb8912.tar.gz
Fix for bug 8416 (bigint test fails on PPC)
strings/decimal.c: <0 doesn't work properly on PPC in that case.
Diffstat (limited to 'strings/decimal.c')
-rw-r--r--strings/decimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index da704280189..16c80158722 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1189,7 +1189,7 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
intg0=intg/DIG_PER_DEC1, frac0=scale/DIG_PER_DEC1,
intg0x=intg-intg0*DIG_PER_DEC1, frac0x=scale-frac0*DIG_PER_DEC1,
intg1=intg0+(intg0x>0), frac1=frac0+(frac0x>0);
- dec1 *buf=to->buf, mask=(*from <0) ? 0 : -1;
+ dec1 *buf=to->buf, mask=(*from & 0x80) ? 0 : -1;
char *stop;
char *d_copy;
int bin_size= decimal_bin_size(precision, scale);