You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
fix(funcexp): MCOL-5386 Bitwise aggregation functions do not work with wide decimals (internal error) (#3485)
This commit is contained in:
11
mysql-test/columnstore/bugfixes/mcol_5386.result
Normal file
11
mysql-test/columnstore/bugfixes/mcol_5386.result
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
DROP DATABASE IF EXISTS mcol_5386;
|
||||||
|
CREATE DATABASE mcol_5386;
|
||||||
|
USE mcol_5386;
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
create table t1(c decimal(19)) engine=columnstore;
|
||||||
|
insert into t1(c) values (-2);
|
||||||
|
select bit_or(c), bit_xor(c), bit_and(c) from t1;
|
||||||
|
bit_or(c) bit_xor(c) bit_and(c)
|
||||||
|
18446744073709551614 18446744073709551614 18446744073709551614
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
DROP DATABASE mcol_5386;
|
21
mysql-test/columnstore/bugfixes/mcol_5386.test
Normal file
21
mysql-test/columnstore/bugfixes/mcol_5386.test
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
-- source ../include/have_columnstore.inc
|
||||||
|
--disable_warnings
|
||||||
|
DROP DATABASE IF EXISTS mcol_5386;
|
||||||
|
--enable_warnings
|
||||||
|
CREATE DATABASE mcol_5386;
|
||||||
|
USE mcol_5386;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--enable_warnings
|
||||||
|
create table t1(c decimal(19)) engine=columnstore;
|
||||||
|
insert into t1(c) values (-2);
|
||||||
|
select bit_or(c), bit_xor(c), bit_and(c) from t1;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP DATABASE mcol_5386;
|
||||||
|
--enable_warnings
|
@ -866,6 +866,8 @@ inline int64_t Row::getIntField(uint32_t colIndex) const
|
|||||||
|
|
||||||
case 8: return *((int64_t*)&data[offsets[colIndex]]);
|
case 8: return *((int64_t*)&data[offsets[colIndex]]);
|
||||||
|
|
||||||
|
case 16: return *((int128_t*)&data[offsets[colIndex]]);
|
||||||
|
|
||||||
default: idbassert(0); throw std::logic_error("Row::getIntField(): bad length.");
|
default: idbassert(0); throw std::logic_error("Row::getIntField(): bad length.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user