Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
5.5.25
-
None
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.