From aaef69040adfc8b7ddc724c9805b7dcd19e419d9 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 27 May 2021 14:33:36 +0400 Subject: [PATCH] MCOL-4736 Fix cross-engine tests to run without --extern --- mysql-test/columnstore/basic/suite.pm | 19 +++++++++++++++++++ .../t/mcs44_select_crossengine_join.test | 12 ++++++++++-- .../basic/t/mcs45_write_crossengine_join.test | 13 +++++++++++-- .../basic/t/mcs63_crossengine_views.test | 13 +++++++++++-- .../basic/t/mcs64_crossengine_group_by.test | 13 +++++++++++-- .../basic/t/mcs65_crossengine_order_by.test | 13 +++++++++++-- ...ossengine_where_groupby_orderby_limit.test | 13 +++++++++++-- .../columnstore/basic/t/mcs79_exists.test | 13 +++++++++++-- .../basic/t/mcs80_set_operations.test | 13 +++++++++++-- .../basic/t/mcs85_derived_table.test | 13 +++++++++++-- .../basic/t/mcs90_aggregate_functions.test | 13 +++++++++++-- 11 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 mysql-test/columnstore/basic/suite.pm diff --git a/mysql-test/columnstore/basic/suite.pm b/mysql-test/columnstore/basic/suite.pm new file mode 100644 index 000000000..d3163ab0a --- /dev/null +++ b/mysql-test/columnstore/basic/suite.pm @@ -0,0 +1,19 @@ +package My::Suite::ColumnStore; + +@ISA = qw(My::Suite); + +my $mcs_bin_dir_compiled=$::bindir . '/storage/columnstore/columnstore/bin'; +my $mcs_ins_dir_installed=$::bindir . '/bin'; + +if (-d $mcs_bin_dir_compiled) +{ + $ENV{MCS_MCSSETCONFIG}=$mcs_bin_dir_compiled . "/mcsSetConfig"; +} +elsif (-d $mcs_ins_dir_installed) +{ + $ENV{MCS_MCSSETCONFIG}=$mcs_ins_dir_installed . "/mcsSetConfig"; +} + +sub is_default { 0 } + +bless { }; diff --git a/mysql-test/columnstore/basic/t/mcs44_select_crossengine_join.test b/mysql-test/columnstore/basic/t/mcs44_select_crossengine_join.test index 565942d8e..2ac89b8dd 100644 --- a/mysql-test/columnstore/basic/t/mcs44_select_crossengine_join.test +++ b/mysql-test/columnstore/basic/t/mcs44_select_crossengine_join.test @@ -2,8 +2,15 @@ # Cross engine join # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs44_db; --enable_warnings @@ -15,8 +22,9 @@ USE mcs44_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs45_write_crossengine_join.test b/mysql-test/columnstore/basic/t/mcs45_write_crossengine_join.test index 21dabb44a..b97abccf9 100644 --- a/mysql-test/columnstore/basic/t/mcs45_write_crossengine_join.test +++ b/mysql-test/columnstore/basic/t/mcs45_write_crossengine_join.test @@ -2,8 +2,15 @@ # Update and Delete using Cross engine join # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs45_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs45_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs63_crossengine_views.test b/mysql-test/columnstore/basic/t/mcs63_crossengine_views.test index 7b2373228..2195c076d 100644 --- a/mysql-test/columnstore/basic/t/mcs63_crossengine_views.test +++ b/mysql-test/columnstore/basic/t/mcs63_crossengine_views.test @@ -2,8 +2,15 @@ # Cross Engine View # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs63_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs63_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs64_crossengine_group_by.test b/mysql-test/columnstore/basic/t/mcs64_crossengine_group_by.test index e0200312a..ddc7209ba 100644 --- a/mysql-test/columnstore/basic/t/mcs64_crossengine_group_by.test +++ b/mysql-test/columnstore/basic/t/mcs64_crossengine_group_by.test @@ -2,8 +2,15 @@ # Cross Engine GROUP BY statements # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs64_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs64_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test b/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test index a197a2d0c..c6fa67ca5 100644 --- a/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test +++ b/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test @@ -2,8 +2,15 @@ # Cross Engine ORDER BY statements # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs65_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs65_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs71_crossengine_where_groupby_orderby_limit.test b/mysql-test/columnstore/basic/t/mcs71_crossengine_where_groupby_orderby_limit.test index fcd4f1857..88828baec 100644 --- a/mysql-test/columnstore/basic/t/mcs71_crossengine_where_groupby_orderby_limit.test +++ b/mysql-test/columnstore/basic/t/mcs71_crossengine_where_groupby_orderby_limit.test @@ -2,8 +2,15 @@ # Cross Engine GROUP BY..ORDER BY..LIMIT statements # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs71_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs71_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs79_exists.test b/mysql-test/columnstore/basic/t/mcs79_exists.test index 0f33d85c5..0b857c511 100644 --- a/mysql-test/columnstore/basic/t/mcs79_exists.test +++ b/mysql-test/columnstore/basic/t/mcs79_exists.test @@ -2,8 +2,15 @@ # Test EXISTS clause # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs79_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs79_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs80_set_operations.test b/mysql-test/columnstore/basic/t/mcs80_set_operations.test index b8db88385..a09637d4b 100644 --- a/mysql-test/columnstore/basic/t/mcs80_set_operations.test +++ b/mysql-test/columnstore/basic/t/mcs80_set_operations.test @@ -2,8 +2,15 @@ # Test Set operators like UNION, UNION ALL, EXCEPT, INTERSECT # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs80_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs80_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs85_derived_table.test b/mysql-test/columnstore/basic/t/mcs85_derived_table.test index 5bf80148c..1ffc8a4fb 100644 --- a/mysql-test/columnstore/basic/t/mcs85_derived_table.test +++ b/mysql-test/columnstore/basic/t/mcs85_derived_table.test @@ -2,8 +2,15 @@ # Test Derived tables # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs85_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs85_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server # diff --git a/mysql-test/columnstore/basic/t/mcs90_aggregate_functions.test b/mysql-test/columnstore/basic/t/mcs90_aggregate_functions.test index 4d0c7b71f..b88307acc 100644 --- a/mysql-test/columnstore/basic/t/mcs90_aggregate_functions.test +++ b/mysql-test/columnstore/basic/t/mcs90_aggregate_functions.test @@ -2,8 +2,15 @@ # Test Aggregate Functions # Author: Bharath, bharath.bokka@mariadb.com # +-- source include/have_innodb.inc -- source ../include/have_columnstore.inc +if (!$MASTER_MYPORT) +{ + # Running with --extern + let $MASTER_MYPORT=`SELECT @@port`; +} + --disable_warnings DROP DATABASE IF EXISTS mcs90_db; --enable_warnings @@ -15,8 +22,10 @@ USE mcs90_db; # Enable cross engine join # Configure user and password in Columnstore.xml file # ---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser' ---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001' +--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT + # # Create corresponding in the server #