1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00

41 lines
1.6 KiB
Plaintext

# -------------------------------------------------------------- #
# Test case migrated from regression test suite: bug3524.sql
#
# Author: Daniel Lee, daniel.lee@mariadb.com
# -------------------------------------------------------------- #
#
--source ../include/have_columnstore.inc
#
USE tpch1;
#
--disable_warnings
drop table if exists a1;
drop table if exists a2;
--enable_warnings
create table a1 (c1 int, c2 int)engine=columnstore;
create table a2 (c1 int, c2 int)engine=columnstore;
insert into a1 values (1, 1),(2,2),(3,null),(null,3),(null,null);
insert into a2 values (1, 1),(2, null),(null, 2),(3, 3),(null, null);
select * from a1 where c1 not in (select c2 from a2);
select * from a1 where c1 not in (select c2 from a2 where a1.c2=a2.c2);
select * from a1 where not exists (select c2 from a2 where a1.c2=a2.c2 and a1.c1=a2.c1);
select * from a1 where not exists (select c2 from a2 where a1.c2=a2.c2);
#-- failed to compare because of bug2810 not fixed yet
#-- select * from a1 where (c1,c2) not in (select c1,c2 from a2);
#-- failed to compare because of bug2810 not fixed yet
#-- select * from a1 where (c1,c2) not in (select c1,c2 from a2 where a2.c1 = a1.c2);
select * from a1 where (c1,c2) not in (select c1,c2 from a2 where a2.c1 > a1.c2);
select * from a1 where c1 not in (select c2 from a2 where a1.c2>a2.c2);
select * from a1 where c1 not in (select 1 from a2 where a1.c1=a2.c1);
select count(*) from a1 where c1 not in (select c2 from a2 where a1.c2=a2.c2);
select count(*) from a1 where not exists (select c2 from a2 where a1.c2=a2.c2 and a1.c1=a2.c1);
--disable_warnings
drop table a1;
drop table a2;
--enable_warnings
#