[MCOL-5614] Columnstore (&MDB) query returns incorrect value instead of expected out-of-range error Created: 2023-11-15  Updated: 2023-11-15

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kirill Perov Assignee: Roman
Resolution: Unresolved Votes: 0
Labels: 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.


Generated at Thu Feb 08 02:59:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.