Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Cannot Reproduce
-
None
-
None
Description
create schema coltest; use coltest;
drop table if exists test_mult;
create table test_mult (
indemnity_paid int(11),
n_clms DECIMAL UNSIGNED
) engine=columnstore;
insert into test_mult (indemnity_paid, n_clms) values (-10, 1);
select indemnity_paid, n_clms, indemnity_paid * n_clms from test_mult;
---------------------------------------------
indemnity_paid | n_clms | indemnity_paid * n_clms |
---------------------------------------------
10 | 1 | -10 |
---------------------------------------------
The multiplication produces an incorrect value.
For tinyint unsigned, the multiplication produces an expected out-of-range error:
ERROR 1815 (HY000): Internal error: MCS-2061: BIGINT UNSIGNED value is out of range in '`unk`.`unk`.`unk` "*" `unk`.`unk`.`unk`'
Same no error for FLOAT UNSIGNED and DOUBLE UNSIGNED.