mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/home/hf/work/8663/my50-8663
into mysql.com:/home/hf/work/8663/my51-8663 strings/decimal.c: Auto merged mysql-test/r/bigint.result: SCCS merged mysql-test/t/bigint.test: merging
This commit is contained in:
@ -1089,7 +1089,11 @@ int decimal2longlong(decimal_t *from, longlong *to)
|
||||
x=x*DIG_BASE - *buf++;
|
||||
if (unlikely(y < (LONGLONG_MIN/DIG_BASE) || x > y))
|
||||
{
|
||||
*to= from->sign ? y : -y;
|
||||
/*
|
||||
the decimal is bigger than any possible integer
|
||||
return border integer depending on the sign
|
||||
*/
|
||||
*to= from->sign ? LONGLONG_MIN : LONGLONG_MAX;
|
||||
return E_DEC_OVERFLOW;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user