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 
			
		
		
		
	Main theme of the patch is to fix joins processing in the plugin code. We now use SELECT_LEX::top_join_list and process the nested joins recursively, instead of SELECT_LEX::table_list struct which we earlier used to build the join filters. The earlier approach did not process certain nested join ON expressions, causing certain queries to incorrectly error out such as that described in MCOL-4680. In addition, some legacy code is also removed.
		
			
				
	
	
		
			42 lines
		
	
	
		
			760 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			760 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
--source ../include/have_columnstore.inc
 | 
						|
--source ctype_cmp_combinations.inc
 | 
						|
--source default_storage_engine_by_combination.inc
 | 
						|
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # FROM subquery containing nested joins returns an error
 | 
						|
--echo #
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
DROP DATABASE IF EXISTS mcol4680;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
CREATE DATABASE mcol4680;
 | 
						|
USE mcol4680;
 | 
						|
 | 
						|
create table t1 (a int);
 | 
						|
insert into t1 values (1), (2), (3);
 | 
						|
 | 
						|
create table t2 (a int);
 | 
						|
insert into t2 values (2);
 | 
						|
 | 
						|
create table t3 (a int);
 | 
						|
 | 
						|
create table t4 (a int);
 | 
						|
 | 
						|
create table t5 (a int);
 | 
						|
 | 
						|
select * from
 | 
						|
(
 | 
						|
  select t1.a as col1, t2.a as col2 from
 | 
						|
   t1 left join
 | 
						|
   (
 | 
						|
    (t2 left join t3 on t2.a=t3.a) left join
 | 
						|
    (t4 left join t5 on t4.a=t5.a)
 | 
						|
    on t2.a=t4.a
 | 
						|
   )
 | 
						|
   on t1.a=t2.a
 | 
						|
) h order by col1;
 | 
						|
 | 
						|
DROP DATABASE mcol4680;
 |