[MCOL-4736] Fix cross-engine mtr tests to run without --extern Created: 2021-05-27  Updated: 2021-06-02  Resolved: 2021-06-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: mtr
Affects Version/s: 5.6.1
Fix Version/s: 5.6.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-4659 Server MTR failures on ColumnStore tests Open
relates to MCOL-4674 Fix ColumnStore to run MTR tests in a... Closed
relates to MCOL-4676 ColumnStore MTR tests: missing have_i... Closed
relates to MCOL-4678 MTR tests fail because of /tmp and ./... Closed
relates to MCOL-4693 ColumnStore MTR tests: FUNCTION mcs19... Closed

 Description   

If I run MTR without --extern, the following tests, related to cross-engine queries, fail:

columnstore/basic.mcs44_select_crossengine_join
columnstore/basic.mcs45_write_crossengine_join
columnstore/basic.mcs63_crossengine_views
columnstore/basic.mcs64_crossengine_group_by
columnstore/basic.mcs65_crossengine_order_by
columnstore/basic.mcs71_crossengine_where_groupby_orderby_limit
columnstore/basic.mcs79_exists
columnstore/basic.mcs80_set_operations
columnstore/basic.mcs85_derived_table
columnstore/basic.mcs90_aggregate_functions

The description of all found problems follows.

Missing InnoDB engine

The first problem is a missing -- source include/have_innodb.inc directive. This makes tests fail with the following error:

mysqltest: At line 30: query 'CREATE TABLE t1 (t1_int INT, t1_char CHAR(5))ENGINE=Innodb' failed: 1286: Unknown storage engine 'Innodb'

Hard-coded path to tools

Hard-coded paths in these commands

---exec /usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser'
---exec /usr/bin/mcsSetConfig CrossEngineSupport Password 'Vagrant1|0000001'

assume that MariaDB is installed in the default location. If MariaDB is compiled with a non-default CMAKE_INSTALL_PREFIX, tests fail with this error:

mysqltest: At line 19: exec of '/usr/bin/mcsSetConfig CrossEngineSupport User 'cejuser'' failed, error: 32512, status: 127, errno: 11

These lines should be fixed to:

--exec $MCS_MCSSETCONFIG CrossEngineSupport User 'cejuser'
--exec $MCS_MCSSETCONFIG CrossEngineSupport Password 'Vagrant1|0000001'

where $MCS_MCSSETCONFIG should be detected inside this new file:

storage/columnstore/columnstore/mysql-test/columnstore/basic/suite.pm

with about the following content:

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 { };

It will work correctly in both cases:

  • when mtr is started from the build directory
  • when mtr is started from the installed directory

See storage/mroonga/mysql-test/mroonga/storage/suite.pm as an example of the build vs the installed directory detection.

Port is not configured

A new mcsSetConfig command execution should be added to configure the port:

if (!$MASTER_MYPORT)
{
  # Running with --extern
  let $MASTER_MYPORT=`SELECT @@port`;
}
--exec $MCS_MCSSETCONFIG CrossEngineSupport Port $MASTER_MYPORT

Without this mcsSetConfig invokation, the test assumes to be executed with --extern, and works only with the default port 3306.

When mtr is running without --extern, it starts a MariaDB server on a non-default port. So the above proposed change will make MCS aware of which correct port to use.


Generated at Thu Feb 08 02:52:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.