You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			71 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
 | 
						|
#-- source ../include/have_columnstore.inc
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
DROP DATABASE IF EXISTS mcol4699;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
CREATE DATABASE mcol4699;
 | 
						|
 | 
						|
USE mcol4699;
 | 
						|
 | 
						|
create table t1 (a int, b int) engine=columnstore;
 | 
						|
create table t2 (a int, b int) engine=columnstore;
 | 
						|
create table t3 (a int, b int) engine=columnstore;
 | 
						|
create table t4 (a int, b int) engine=columnstore;
 | 
						|
create table t5 (a int, b int) engine=columnstore;
 | 
						|
create table t6 (a int, b int) engine=columnstore;
 | 
						|
create table t7 (a int, b int) engine=columnstore;
 | 
						|
create table t8 (a int, b int) engine=columnstore;
 | 
						|
create table t9 (a int, b int) engine=columnstore;
 | 
						|
 | 
						|
insert into t1 values (1, 3), (2, 3), (3, 4);
 | 
						|
insert into t2 values (1, 2), (2, 4), (4, 5);
 | 
						|
insert into t3 values (1, 2), (2, 3), (3, 4), (4, 5);
 | 
						|
insert into t4 values (1, 3);
 | 
						|
insert into t5 values (1, 2), (3, 4);
 | 
						|
insert into t6 values (1, 2), (3, 4);
 | 
						|
insert into t7 values (1, 3);
 | 
						|
insert into t8 values (1, 3);
 | 
						|
insert into t9 values (1, 2);
 | 
						|
 | 
						|
# 1 cycle.
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) left join t4 on (t3.a = t4.a);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) where (t3.a = 1 or t3.a = 3);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) where (t3.a > 1);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t2.a = t3.a) left join t4 on (t3.a = t4.a and t1.b = t4.b) order by t3.a;
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t2.a = t3.a) left join t4 on (t3.a = t4.a and t2.b = t4.b) order by t3.a;
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b and t3.a > t1.a);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b and t3.a > t2.a and t3.a > t1.a);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b and t3.b > t2.a and t3.a < t1.b);
 | 
						|
select * from t1 left join t2 on (t1.a = t2.a) left join t3 on (t2.a = t3.a) left join t4 on (t4.a = t3.a) left join t5 on (t5.a = t2.a) left join t6 on (t5.a = t6.a and t6.a = t4.a);
 | 
						|
 | 
						|
# 2 cycles.
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) left join t4 on (t3.a = t4.a and t2.a = t4.a) order by t3.a;
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) right join t4 on (t3.a = t4.a and t2.a = t4.a) order by t3.a;
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a) left join t4 on (t3.a = t4.a and t1.a = t4.a and t2.a = t4.a);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a) right join t4 on (t3.a = t4.a and t1.a = t4.a and t2.a = t4.a);
 | 
						|
select * from t1 left join t2 on (t1.a = t2.a) left join t3 on (t2.a = t3.a) left join t4 on (t4.a = t3.a) left join t5 on (t5.a = t2.a) left join t6 on (t5.a = t6.a and t6.a = t4.a) left join t7 on (t7.a = t3.a) left join t8 on (t8.a = t7.a and t8.a = t2.a);
 | 
						|
 | 
						|
# 3 cycles.
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) left join t4 on (t3.a = t4.a and t2.a = t4.a) left join t5 on (t4.a = t5.a and t3.b = t5.b);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) left join t4 on (t3.a = t4.a and t2.a = t4.a) right join t5 on (t4.a = t5.a and t3.b = t5.b);
 | 
						|
select * from t1 left join t2 on (t1.a = t2.a) left join t3 on (t2.a = t3.a) left join t4 on (t4.a = t3.a) left join t5 on (t5.a = t2.a) left join t6 on (t5.a = t6.a and t6.a = t4.a) left join t7 on (t7.a = t3.a) left join t8 on (t8.a = t7.a and t8.a = t2.a) left join t9 on (t7.a = t9.a and t4.a = t9.a);
 | 
						|
 | 
						|
# 4 cycles.
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) left join t4 on (t3.a = t4.a and t2.a = t4.a) right join t5 on (t4.a = t5.a and t3.b = t5.b) right join t6 on (t5.a = t6.a and t4.a = t6.a);
 | 
						|
select * from t1 inner join t2 on (t1.a = t2.a) right join t3 on (t1.a = t3.a and t2.b = t3.b) left join t4 on (t3.a = t4.a and t2.a = t4.a) right join t5 on (t4.a = t5.a and t3.b = t5.b) left join t6 on (t5.a = t6.a and t4.a = t6.a);
 | 
						|
 | 
						|
drop table t1;
 | 
						|
drop table t2;
 | 
						|
drop table t3;
 | 
						|
drop table t4;
 | 
						|
drop table t5;
 | 
						|
drop table t6;
 | 
						|
drop table t7;
 | 
						|
drop table t8;
 | 
						|
drop table t9;
 | 
						|
 | 
						|
DROP DATABASE mcol4699;
 |