1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug #8663 (cant use bigint as input to CAST)

decimal->ulong conversion fixed to assign max possible ULONG if decimal
is bigger
Item_func_unsigned now handles DECIMAL parameter separately as we can't
rely on decimal::val_int result here.
This commit is contained in:
holyfoot/hf@mysql.com/deer.(none)
2006-10-30 09:52:50 +04:00
parent 4eff5ab26a
commit 18577a8e8f
4 changed files with 20 additions and 2 deletions

View File

@@ -1036,7 +1036,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;
}
}