You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-10-31 18:30:33 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # -------------------------------------------------------------- #
 | |
| # Test case migrated from regression test suite: bug3398.sql
 | |
| #
 | |
| # Author: Daniel Lee, daniel.lee@mariadb.com
 | |
| # -------------------------------------------------------------- #
 | |
| #
 | |
| --source ../include/have_columnstore.inc
 | |
| #
 | |
| USE tpch1;
 | |
| #
 | |
| --disable_warnings
 | |
| DROP TABLE IF EXISTS bug3398_1;
 | |
| DROP TABLE IF EXISTS bug3398_2;
 | |
| --enable_warnings
 | |
| 
 | |
| CREATE TABLE bug3398_1 (lid int, name char(10)) engine=columnstore;
 | |
| INSERT INTO bug3398_1 (lid, name) VALUES (1, 'YES'), (2, 'NO');
 | |
| 
 | |
| CREATE TABLE bug3398_2 (  id int, gid int, lid int, dt date) engine=columnstore;
 | |
| INSERT INTO bug3398_2 (id, gid, lid, dt) VALUES
 | |
| (1, 1, 1, '2007-01-01'),(2, 1, 2, '2007-01-02'),
 | |
| (3, 2, 2, '2007-02-01'),(4, 2, 1, '2007-02-02');
 | |
| 
 | |
| SELECT DISTINCT tt.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2 WHERE bug3398_1.lid  = bug3398_2.lid AND bug3398_2.gid = lgid and bug3398_1.name > 'NO' ORDER BY bug3398_2.dt) as clid FROM bug3398_2 tt ORDER BY 1;
 | |
| 
 | |
| SELECT DISTINCT bug3398_2.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2 WHERE bug3398_1.lid  = bug3398_2.lid AND bug3398_2.gid = lgid and bug3398_1.name > 'NO' ORDER BY bug3398_2.dt) as clid FROM bug3398_2 ORDER BY 1;
 | |
| 
 | |
| --disable_warnings
 | |
| DROP TABLE bug3398_1;
 | |
| DROP TABLE bug3398_2;
 | |
| --enable_warnings
 | |
| #
 | |
| 
 |