summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-03-10 12:46:56 +0100
committerSergei Golubchik <sergii@pisem.net>2013-03-10 12:46:56 +0100
commit8dad7dfa6ae40e54e814d3ba135f45bff0c13e8f (patch)
tree0432ab82e496017306a155eeb530ff5f2e184c4e /strings
parent9d8ee74b38c5db13dc4466e76b7ad2eb8ce36a5a (diff)
parent926b0f54c9b0f261460e886969dde9bbf1916852 (diff)
downloadmariadb-git-8dad7dfa6ae40e54e814d3ba135f45bff0c13e8f.tar.gz
5.3->5.5 merge
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index f318a234d3f..3245f224b44 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1445,7 +1445,9 @@ int decimal_bin_size(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;
- DBUG_ASSERT(scale >= 0 && precision > 0 && scale <= precision);
+ DBUG_ASSERT(scale >= 0);
+ DBUG_ASSERT(precision > 0);
+ DBUG_ASSERT(scale <= precision);
return intg0*sizeof(dec1)+dig2bytes[intg0x]+
frac0*sizeof(dec1)+dig2bytes[frac0x];
}