diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 245b655767d..05534ed9680 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4397,7 +4397,11 @@ sub start_mysqltest ($) { { mtr_add_arg($args, "--record"); - mtr_add_arg($args, "--result-file=%s", $tinfo->{record_file}); + # When recording to a non existing result file + # the name of that file is in "record_file" + if ( defined $tinfo->{'record_file'} ) { + mtr_add_arg($args, "--result-file=%s", $tinfo->{record_file}); + } } if ( $opt_client_gdb )