To specify the binary log format for a test run, you can use the
--mysqld or --combination
option to tell mysql-test-run.pl to pass a
logging option to mysqld. For example, the
following command runs the tests from the rpl
suite that have names that begin with
rpl_row. The tests are run once with the
binary log format set to STATEMENT:
shell>mysql-test-run.pl --suite=rpl --do-test=rpl_row--mysqld=--binlog_format=statement
To run tests under multiple log formats, use two or more
instances of the --combination option. The
following command runs the same tests as the preceding command,
but runs them once with the binary log format set to
ROW and a second time with the format set to
MIXED:
shell>mysql-test-run.pl --suite=rpl --do-test=rpl_row--combination=--binlog_format=row--combination=--binlog_format=mixed
The --combination option must be given at least
twice or it has no effect.
As an alternative to using the --combination
option, you can create a file named
combinations in the test suite directory
and list the options that you would specify via
--combination, one line per option. For the
preceding mysql-test-run.pl command, the
suite name is rpl, so you would create a file
named suite/rpl/combinations with these
contents:
[row] --binlog_format=row [mixed] --binlog_format=mixed
Then invoke mysql-test-run.pl like this:
shell> mysql-test-run.pl --suite=rpl --do-test=row
The format of the combinations file is
similar to that of my.cnf files (section
names followed by options for each section), but options listed
in the combinations file should include the
leading dashes. (Options in my.cnf files
are given without the leading dashes.)
mysql-test-run.pl displays the section name
following the test name when it reports the test result.
Any --combination options specified on the
command line override those found in a
combinations file.
The --combination option and the
combinations file have different scope. The
--combination option applies globally to all
tests run by a given invocation of
mysql-test-run.pl. The
combinations file is placed in a test suite
directory and applies only to tests in that suite.
