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

MCOL-641 Refactored MultiplicationOverflowCheck but it still has flaws.

Introduced fDecimalOverflowCheck to enable/disable overflow check.

Add support into a FunctionColumn.

Low level scanning crashes on medium sized data sets.
This commit is contained in:
Roman Nozdrin
2020-03-24 13:41:28 +00:00
parent 74b64eb4f1
commit b5534eb847
13 changed files with 528 additions and 36 deletions

View File

@ -729,3 +729,15 @@ TEST(Decimal, additionWithOverflowCheck)
EXPECT_EQ(38, result.precision);
EXPECT_EQ(l.s128Value, result.s128Value);
}
TEST(Decimal, multiplicationWithOverflowCheck)
{
datatypes::MultiplicationOverflowCheck mul;
int128_t x = 42, y = 42, r = 0;
execplan::IDB_Decimal d;
EXPECT_NO_THROW(mul(x, y, r));
EXPECT_EQ(x*y, r);
x = datatypes::Decimal::maxInt128, y = 42, r = 0;
EXPECT_THROW(mul(x, y, r), logging::OperationOverflowExcept);
}