1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/bugfixes/mcol-4715.test

29 lines
1.1 KiB
Plaintext

#
# Mixed inner and outer joins with "null filter" for the table which is not involved into the outer join produces wrong results.
#
-- source ../include/have_columnstore.inc
--disable_warnings
DROP DATABASE IF EXISTS mcol_4715;
--enable_warnings
CREATE DATABASE mcol_4715;
USE mcol_4715;
create table t1 (a int) engine=columnstore;
create table t2 (a int) engine=columnstore;
create table t3 (a int) engine=columnstore;
create table t4 (a int) engine=columnstore;
insert into t1 values (1), (2), (3), (4);
insert into t2 values (2), (3), (4);
insert into t3 values (3), (4);
insert into t4 values (4);
select * from t1 left join t2 left join t3 on t2.a=t3.a on t1.a=t3.a where t2.a is null order by t1.a;
select * from t2 inner join t3 on t2.a = t3.a right join t1 on t1.a = t3.a where t2.a is null order by t1.a;
select * from t1 left join t2 on t1.a=t2.a left join t3 left join t4 on t3.a=t4.a on t1.a=t4.a where t3.a is null order by t1.a;
select * from t1 left join t2 on t1.a=t2.a left join t3 left join t4 on t3.a=t4.a on t2.a=t4.a where t3.a is null order by t1.a;
DROP DATABASE mcol_4715;