[MDEV-399] Combinations defined in the base suite cannot be skipped by overlay Created: 2012-07-17  Updated: 2012-08-01  Resolved: 2012-08-01

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.25
Fix Version/s: 5.5.27

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: tests


 Description   

The binlog suite already has a combinations file, which defines three combinations: row, mix, stmt. We will be working with it.

cd <basedir>/mysql-test

Create an overlay for the binlog suite for MyISAM:

mkdir -p ../storage/myisam/mysql-test/binlog

Run the test to make sure that combinations still work:

perl ./mtr --suite=binlog-myisam binlog_server_id

binlog-myisam.binlog_server_id 'mix'     [ pass ]     16
binlog-myisam.binlog_server_id 'row'     [ pass ]     19
binlog-myisam.binlog_server_id 'stmt'    [ pass ]     14

Add suite.pm in the overlay:
vi ../storage/myisam/mysql-test/binlog/suite.pm

package My::Suite::Binlog::MyISAM;
 
@ISA = qw(My::Suite);
 
sub skip_combinations {(
    'combinations' => [ 'mix', 'rpl' ],
)}
bless { };

Run the test again:

perl ./mtr --suite=binlog-myisam binlog_server_id

binlog-myisam.binlog_server_id 'mix'     [ pass ]     14
binlog-myisam.binlog_server_id 'row'     [ pass ]     12
binlog-myisam.binlog_server_id 'stmt'    [ pass ]     13

Didn't work – mix is still there.

Add its own combinations file in the overlay:

vi ../storage/myisam/mysql-test/binlog/combinations

[mine5]
--lock-wait-timeout=5
 
[mine3]
--lock-wait-timeout=3

Run the test again:

perl ./mtr --suite=binlog-myisam binlog_server_id

binlog-myisam.binlog_server_id 'mix'     [ pass ]     12
binlog-myisam.binlog_server_id 'row'     [ pass ]     12
binlog-myisam.binlog_server_id 'stmt'    [ pass ]     19
binlog-myisam.binlog_server_id 'mine3'   [ pass ]     17
binlog-myisam.binlog_server_id 'mine5'   [ pass ]     15

The combinations file in overlay works.

Try to disable one of the suite's custom combinations:

vi ../storage/myisam/mysql-test/binlog/suite.pm

package My::Suite::Binlog::MyISAM;
 
@ISA = qw(My::Suite);
 
sub skip_combinations {(
    'combinations' => [ 'mix', 'rpl', 'mine3' ],
)}
bless { };

perl ./mtr --suite=binlog-myisam binlog_server_id

binlog-myisam.binlog_server_id 'mix'     [ pass ]     12
binlog-myisam.binlog_server_id 'row'     [ pass ]     13
binlog-myisam.binlog_server_id 'stmt'    [ pass ]     14
binlog-myisam.binlog_server_id 'mine5'   [ pass ]     13

This worked, so it's not like our subroutine is bad, or something; but 'mix' is still there.

Possibly the combinations file should be somehow specified with a prefix in the suite.pm (in the hash key), but I haven't found a way to do so, neither by trying nor by reading the code, although maybe I didn't dig deep enough.


Generated at Thu Feb 08 06:28:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.