diff options
author | msvensson@shellback.(none) <> | 2006-11-29 15:44:09 +0100 |
---|---|---|
committer | msvensson@shellback.(none) <> | 2006-11-29 15:44:09 +0100 |
commit | 7ddc43e30596246effffa5944c23d019120f8dda (patch) | |
tree | 9a20c4415bb69ebb31576302a0e46beb9863997e /strings | |
parent | ebee55f48a09c3971192beeb122d3fff17794ba6 (diff) | |
parent | 40684173ad1c4a0a64c8c5bccc0ac9ff1009d8bf (diff) | |
download | mariadb-git-7ddc43e30596246effffa5944c23d019120f8dda.tar.gz |
Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index 4ff2b5a693a..6070271c684 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1042,7 +1042,7 @@ int decimal2ulonglong(decimal_t *from, ulonglong *to) x=x*DIG_BASE + *buf++; if (unlikely(y > ((ulonglong) ULONGLONG_MAX/DIG_BASE) || x < y)) { - *to=y; + *to=ULONGLONG_MAX; return E_DEC_OVERFLOW; } } @@ -1354,7 +1354,7 @@ int bin2decimal(char *from, decimal_t *to, int precision, int scale) } from+=i; *buf=x ^ mask; - if (((ulonglong)*buf) >= (ulonglong) powers10[intg0x+1]) + if (((ulonglong)*buf) >= (ulonglong) powers10[intg0x+1]) goto err; if (buf > to->buf || *buf != 0) buf++; |