You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
fix(MCOL-5889): Improper handle of DOUBLE result type with DECIMAL arguments
Sometimes server assigns DOUBLE type for arithmetic operations over DECIMAL arguments. In this rare case width of result was incorrectly adjusted and it triggered an assertion. Now width of result gets adjusted only if result type is also DECIMAL.
This commit is contained in:
committed by
Leonid Fedorov
parent
0208758e3b
commit
6e539b8336
@ -4019,7 +4019,8 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo
|
||||
int32_t leftColWidth = leftColType.colWidth;
|
||||
int32_t rightColWidth = rightColType.colWidth;
|
||||
|
||||
if (leftColWidth == datatypes::MAXDECIMALWIDTH || rightColWidth == datatypes::MAXDECIMALWIDTH)
|
||||
if ((leftColWidth == datatypes::MAXDECIMALWIDTH || rightColWidth == datatypes::MAXDECIMALWIDTH)
|
||||
&& datatypes::isDecimal(mysqlType.colDataType))
|
||||
{
|
||||
mysqlType.colWidth = datatypes::MAXDECIMALWIDTH;
|
||||
|
||||
|
Reference in New Issue
Block a user