summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-12-24 11:00:31 +0100
committerunknown <serg@serg.mylan>2005-12-24 11:00:31 +0100
commitaa73647348c49704673740e92ef8e9fbcf6865b3 (patch)
treedeaf40439e3087b3f3da4479debd9fa81db88907 /strings
parentc885fb0456876944b43b9d9341cf137bebf39a5d (diff)
parentbcc1ecd37b5434503a7280719088558a8a26b61f (diff)
downloadmariadb-git-aa73647348c49704673740e92ef8e9fbcf6865b3.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
Diffstat (limited to 'strings')
-rw-r--r--strings/decimal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 0c1f03016e0..5fb37d374a2 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -1069,9 +1069,9 @@ int decimal2longlong(decimal_t *from, longlong *to)
}
}
/* boundary case: 9223372036854775808 */
- if (unlikely(from->sign==0 && x < 0 && -x < 0))
+ if (unlikely(from->sign==0 && x == LONGLONG_MIN))
{
- *to= -1-x;
+ *to= LONGLONG_MAX;
return E_DEC_OVERFLOW;
}
@@ -2675,7 +2675,8 @@ void test_pr(const char *s1, int prec, int dec, char filler, const char *orig,
int slen= sizeof(s2);
int res;
- sprintf(s, "'%s', %d, %d, '%c'", s1, prec, dec, filler);
+ sprintf(s, filler ? "'%s', %d, %d, '%c'" : "'%s', %d, %d, '\\0'",
+ s1, prec, dec, filler);
end= strend(s1);
string2decimal(s1, &a, &end);
res= decimal2string(&a, s2, &slen, prec, dec, filler);