Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
6.4.6, 22.08.8
-
None
-
2023-11
Description
create schema coltest; use coltest;
|
drop table if exists test_mult;
|
create table test_mult (
|
indemnity_paid int(11),
|
n_clms tinyint(3) 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 | 18446744073709551606 |
|
+----------------+--------+-------------------------+
|
The multiplication produces an incorrect value.
For the same table defined engine=innodb, the multiplication produces an expected out-of-range error:
alter table test_mult engine=innodb;
|
select indemnity_paid, n_clms, indemnity_paid * n_clms from test_mult;
|
ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in '`coltest`.`test_mult`.`indemnity_paid` * `coltest`.`test_mult`.`n_clms`'
|