summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2020-06-16 22:59:00 +0300
committerSachin <sachinsetia1001@gmail.com>2020-06-22 12:28:11 +0530
commit009ef36d9ae01a44ddf5e1af35f54740838e1e70 (patch)
treed4971ac20a4d488a6d43d1829b93783e182b5ffc /mysql-test/mysql-test-run.pl
parent804ed12e0e98012b9307a5bf74b41e76dd1ae67b (diff)
downloadmariadb-git-009ef36d9ae01a44ddf5e1af35f54740838e1e70.tar.gz
MDEV-22179 rr support for mtr review
* --rr-arg instead of --rr_option * Bootstrap saved to rr.bootstrap * Replication slaves are saved to rr.N dirs * Perl coding fixes
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl32
1 files changed, 17 insertions, 15 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 5fa087bd28f..93cf00498b4 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1320,7 +1320,7 @@ sub command_line_setup {
'debug-server' => \$opt_debug_server,
'gdb=s' => \$opt_gdb,
'rr' => \$opt_rr,
- 'rr_option=s' => \@rr_record_args,
+ 'rr-arg=s' => \@rr_record_args,
'client-gdb' => \$opt_client_gdb,
'manual-gdb' => \$opt_manual_gdb,
'manual-lldb' => \$opt_manual_lldb,
@@ -1785,11 +1785,16 @@ sub command_line_setup {
mtr_error("Coverage test needs the source - please use source dist");
}
+ if ( @rr_record_args )
+ {
+ $opt_rr= 1;
+ }
+
# --------------------------------------------------------------------------
# Check debug related options
# --------------------------------------------------------------------------
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || $opt_rr ||
- @rr_record_args || $opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd ||
+ $opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd ||
$opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
$opt_debugger || $opt_client_debugger )
{
@@ -2446,7 +2451,6 @@ sub environment_setup {
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
- $ENV{'_RR_TRACE_DIR'}= "$opt_vardir/rr";
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
$ENV{'MYSQL_BINDIR'}= $bindir;
$ENV{'MYSQL_SHAREDIR'}= $path_language;
@@ -2756,7 +2760,6 @@ sub setup_vardir() {
# Create var/tmp and tmp - they might be different
mkpath("$opt_vardir/tmp");
mkpath($opt_tmpdir) if ($opt_tmpdir ne "$opt_vardir/tmp");
- mkpath("$opt_vardir/rr");
# On some operating systems, there is a limit to the length of a
# UNIX domain socket's path far below PATH_MAX.
@@ -3407,8 +3410,11 @@ sub mysql_install_db {
$bootstrap_sql_file);
}
if ($opt_boot_rr) {
- $args= ["record", "$exe_mysqld_bootstrap", @$args];
+ $args= ["record", @rr_record_args, $exe_mysqld_bootstrap, @$args];
$exe_mysqld_bootstrap= "rr";
+ my $rr_dir= "$opt_vardir/rr.bootstrap";
+ $ENV{'_RR_TRACE_DIR'}= $rr_dir;
+ mkpath($rr_dir);
}
my $path_sql= my_find_file($install_basedir,
@@ -5380,17 +5386,13 @@ sub mysqld_start ($$) {
# Indicate the exe should not be started
$exe= undef;
}
- elsif ( $opt_rr || @rr_record_args)
+ elsif ( $opt_rr )
{
- if (@rr_record_args)
- {
- $args= ["record", @rr_record_args, "$exe", @$args];
- }
- else
- {
- $args= ["record", "$exe", @$args];
- }
+ $args= ["record", @rr_record_args, "$exe", @$args];
$exe= "rr";
+ my $rr_dir= "$opt_vardir/rr". $mysqld->after('mysqld');
+ $ENV{'_RR_TRACE_DIR'}= $rr_dir;
+ mkpath($rr_dir);
}
else
{
@@ -6580,7 +6582,7 @@ Options for rr(Record and Replay)
rr Run the "mysqld" executables using rr. Default run
option is "rr record mysqld mysqld_options"
boot-rr Start bootstrap server in rr
- rr_option=ARG Option to give rr record, can be specified more then once
+ rr-arg=ARG Option to give rr record, can be specified more then once
Misc options
user=USER User for connecting to mysqld(default: $opt_user)