MySQL 8.0.39
Source Code Documentation
|
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 using --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
Similar to combinations file in the test suite directory, you can also create a file named test_name.combinations in the test directory and list the options that you would specify using --combination
, one line per option.
If there exist both suite level combinations file and a test_name.combinations file, then the test_name.combinations file will take the priority i.e combinations specified in suite level combinations file will be ignored.
The format of the combinations file is similar to that of my.cnf files (section names followed by options for each section). 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. The test_name.combinations file is placed in a test directory and applies only to test_name.