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 
			
		
		
		
	Also fixing the problem with missing UDFs for the affected tests. (see MCOL-4659 for details): When mtr runs without --remote, the UDFs must be installed inside the test using CREATE FUNCTION. Note, there are still more tests left with missing UDFs. They'll be fixed separately.
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#
 | 
						|
# Test calenablepartitions() function
 | 
						|
# Author: Bharath, bharath.bokka@mariadb.com
 | 
						|
#
 | 
						|
-- source ../include/have_columnstore.inc
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
DROP DATABASE IF EXISTS mcs203_db;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
CREATE DATABASE mcs203_db;
 | 
						|
USE mcs203_db;
 | 
						|
 | 
						|
CREATE TABLE t1(col1 INT, col2 INT, col3 CHAR(8)) ENGINE=Columnstore;
 | 
						|
--replace_result $MTR_SUITE_DIR MTR_SUITE_DIR
 | 
						|
--eval LOAD DATA LOCAL infile '$MTR_SUITE_DIR/../std_data/100Krows.dat' INTO TABLE t1 FIELDS TERMINATED BY '|';
 | 
						|
 | 
						|
SELECT COUNT(*) FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
INSERT INTO t1 SELECT * FROM t1;
 | 
						|
SELECT COUNT(*) FROM t1;
 | 
						|
 | 
						|
let $func_exists=`SELECT COUNT(*) FROM mysql.func WHERE name='calshowpartitions'`;
 | 
						|
 | 
						|
--disable_query_log
 | 
						|
if (!$func_exists)
 | 
						|
{
 | 
						|
  CREATE FUNCTION calshowpartitions RETURNS STRING SONAME "ha_columnstore.so";
 | 
						|
  CREATE FUNCTION caldisablepartitions RETURNS STRING SONAME "ha_columnstore.so";
 | 
						|
  CREATE FUNCTION calenablepartitions RETURNS STRING SONAME "ha_columnstore.so";
 | 
						|
}
 | 
						|
--enable_query_log
 | 
						|
 | 
						|
SELECT calshowpartitions('t1', 'col1');
 | 
						|
SELECT caldisablepartitions('t1', '0.0.1, 0.1.1');
 | 
						|
SELECT calshowpartitions('t1', 'col1');
 | 
						|
SELECT calenablepartitions('t1', '0.0.1');
 | 
						|
SELECT calshowpartitions('t1', 'col1');
 | 
						|
 | 
						|
--disable_query_log
 | 
						|
if (!$func_exists)
 | 
						|
{
 | 
						|
  DROP FUNCTION calshowpartitions;
 | 
						|
  DROP FUNCTION caldisablepartitions;
 | 
						|
  DROP FUNCTION calenablepartitions;
 | 
						|
}
 | 
						|
--enable_query_log
 | 
						|
 | 
						|
 | 
						|
# Clean UP
 | 
						|
DROP DATABASE mcs203_db;
 |