1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Fix truncate and round for char types

This commit is contained in:
mariadb-AndreyPiskunov
2022-09-22 18:14:30 +03:00
committed by Leonid Fedorov
parent 06fa57966b
commit 5b166a9577
2 changed files with 16 additions and 2 deletions

View File

@ -440,7 +440,7 @@ IDB_Decimal Func_truncate::getDecimalVal(Row& row, FunctionParm& parm, bool& isN
if (!isNull)
{
x *= p;
decimal.value = (int64_t)x;
decimal.value = x <= INT64_MIN ? INT64_MIN : x >= INT64_MAX ? INT64_MAX : int64_t(x);
decimal.scale = s;
}
}