1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/bugfixes/mcol-4874.result
Gagan Goel 340a90fc8d MCOL-4874 Crossengine JOIN involving a ColumnStore table and a
wide decimal column in a non-ColumnStore table throws an exception.

ROW::getSignedNullValue() method does not support wide decimal fields
yet. To fix this exception, we remove the call to this method from
CrossEngineStep::setField().
2021-12-08 22:26:52 +00:00

24 lines
833 B
Plaintext

DROP DATABASE IF EXISTS `mcol_4874`;
CREATE DATABASE `mcol_4874`;
USE `mcol_4874`;
CREATE USER IF NOT EXISTS'cejuser'@'localhost' IDENTIFIED BY 'Vagrant1|0000001';
GRANT ALL PRIVILEGES ON *.* TO 'cejuser'@'localhost';
FLUSH PRIVILEGES;
CREATE TABLE cs1 (a1 INT, b1 BIGINT, c1 INT)ENGINE=COLUMNSTORE;
CREATE TABLE i1 (a2 INT, b2 DECIMAL(37,0), c2 INT);
INSERT INTO cs1 VALUES (1, 11, 10), (1, 0, 11);
INSERT INTO i1 VALUES (1, 11, 100), (1, 0, 11), (1, 12, 101);
SELECT * FROM
(
SELECT a1 AS col1, COUNT(DISTINCT(IF((b1 <> 0), c1, NULL))) FROM cs1 group by col1
) as t1
JOIN
(
SELECT a2 AS col1, COUNT(DISTINCT(IF((b2 <> 0), c2, NULL))) FROM i1 GROUP BY col1
) as t2
USING (col1);
col1 COUNT(DISTINCT(IF((b1 <> 0), c1, NULL))) COUNT(DISTINCT(IF((b2 <> 0), c2, NULL)))
1 1 2
DROP USER 'cejuser'@'localhost';
DROP DATABASE `mcol_4874`;