Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.4.3
-
None
-
2020-4, 2020-5
Description
Consider the following sequence from working_tpch/union/union.sql
CREATE TABLE t1 (
cid smallint(5) ,
cv varchar(250)
) engine=columnstore;
INSERT INTO t1 VALUES (8,'dummy');
CREATE TABLE t2 (
cid bigint(20),
cap varchar(255)
) engine=columnstore;
CREATE TABLE t3 (
gid bigint(20) ,
gn varchar(255),
must tinyint(4)
) engine=columnstore;
INSERT INTO t3 VALUES (1,'V1',NULL);
CREATE TABLE t4 (
uid bigint(20),
gid bigint(20),
rid bigint(20),
cid bigint(20)
) engine=columnstore;
INSERT INTO t4 VALUES (1,1,NULL,NULL);
CREATE TABLE t5 (
rid bigint(20),
rl varchar(255)
) engine=columnstore;
CREATE TABLE t6 (
uid bigint(20),
un varchar(250),
uc smallint(5)
) engine=columnstore;
INSERT INTO t6 VALUES (1,'test',8);
SELECT t4.uid, t5.rl, t3.gn as g1, t4.cid, t4.gid as gg FROM t3, t6, t1, t4 left join t5 on t5.rid = t4.rid left join t2 on t2.cid = t4.cid WHERE t3.gid=t4.gid AND t6.uid = t4.uid AND t6.uc = t1.cid AND t1.cv = "dummy" AND t6.un = "test";
SELECT t4.uid, t5.rl, t3.gn as g1, t4.cid, t4.gid as gg FROM t3, t6, t1, t4 left join t5 on t5.rid = t4.rid left join t2 on t2.cid = t4.cid WHERE t3.gid=t4.gid AND t6.uid = t4.uid AND t3.must IS NOT NULL AND t6.uc = t1.cid AND t1.cv = "dummy" AND t6.un = "test";
(SELECT t4.uid, t5.rl, t3.gn as g1, t4.cid, t4.gid as gg FROM t3, t6, t1, t4 left join t5 on t5.rid = t4.rid left join t2 on t2.cid = t4.cid WHERE t3.gid=t4.gid AND t6.uid = t4.uid AND t3.must IS NOT NULL AND t6.uc = t1.cid AND t1.cv = "dummy" AND t6.un = "test") UNION (SELECT t4.uid, t5.rl, t3.gn as g1, t4.cid, t4.gid as gg FROM t3, t6, t1, t4 left join t5 on t5.rid = t4.rid left join t2 on t2.cid = t4.cid WHERE t3.gid=t4.gid AND t6.uid = t4.uid AND t6.uc = t1.cid AND t1.cv = "dummy" AND t6.un = "test");
drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
drop table if exists t4;
drop table if exists t5;
drop table if exists t6;
create table t1 (a int) engine=columnstore;
insert into t1 values (1),(2),(3);
create table t2 (a int) engine=columnstore;
insert into t2 values (3),(4),(5);
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc;
ERROR 1815 (HY000): Internal error: IDB-2006: 'tpch1.t6' does not exist in Columnstore.
This only happens if you run the full sequence. Otherwise, there's no complaint about a table not existing – one that isn't in the query at all.
Attachments
Issue Links
- relates to
-
MCOL-3747 Regression in 1.4 working_ssb_compareLogOnly/sub/order_limit_sub
- Closed