diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-02 07:39:33 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-02 07:39:33 +0300 |
commit | f347b3e0e6592329b1447fa460aca0a4b1f680b1 (patch) | |
tree | c671aced17dc9f6d0cc6c5a660b73b2e2dcfe841 /mysql-test/mysql-test-run.pl | |
parent | b0f836053b094b09999c102d10bf0ad6ed761ac6 (diff) | |
parent | 1df1a6392477ad211b2a66c6eccbe9d5c6316c7e (diff) | |
download | mariadb-git-f347b3e0e6592329b1447fa460aca0a4b1f680b1.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index afd07ec55ba..4cedfa61cce 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # -*- cperl -*- # Copyright (c) 2004, 2014, Oracle and/or its affiliates. @@ -263,8 +263,12 @@ our %gprof_dirs; our $glob_debugger= 0; our $opt_gdb; +my $opt_rr; +my $opt_rr_dir; +my @rr_record_args; our $opt_client_gdb; my $opt_boot_gdb; +my $opt_boot_rr; our $opt_dbx; our $opt_client_dbx; my $opt_boot_dbx; @@ -1155,10 +1159,14 @@ sub command_line_setup { 'debug-common' => \$opt_debug_common, 'debug-server' => \$opt_debug_server, 'gdb=s' => \$opt_gdb, + 'rr' => \$opt_rr, + 'rr-arg=s' => \@rr_record_args, + 'rr-dir=s' => \$opt_rr_dir, 'client-gdb' => \$opt_client_gdb, 'manual-gdb' => \$opt_manual_gdb, 'manual-lldb' => \$opt_manual_lldb, 'boot-gdb' => \$opt_boot_gdb, + 'boot-rr' => \$opt_boot_rr, 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, 'client-ddd' => \$opt_client_ddd, @@ -1622,8 +1630,8 @@ sub command_line_setup { # -------------------------------------------------------------------------- # Check debug related options # -------------------------------------------------------------------------- - if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || - $opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd || + if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || $opt_rr || + $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 ) { @@ -3253,6 +3261,13 @@ sub mysql_install_db { ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(), $bootstrap_sql_file); } + if ($opt_boot_rr) { + $args= ["record", @rr_record_args, $exe_mysqld_bootstrap, @$args]; + $exe_mysqld_bootstrap= "rr"; + my $rr_dir= $opt_rr_dir ? $opt_rr_dir : "$opt_vardir/rr.boot"; + $ENV{'_RR_TRACE_DIR'}= $rr_dir; + mkpath($rr_dir); + } my $path_sql= my_find_file($install_basedir, ["mysql", "sql/share", "share/mariadb", @@ -5249,6 +5264,14 @@ sub mysqld_start ($$) { # Indicate the exe should not be started $exe= undef; } + elsif ( $opt_rr ) + { + $args= ["record", @rr_record_args, "$exe", @$args]; + $exe= "rr"; + my $rr_dir= $opt_rr_dir ? $opt_rr_dir : "$opt_vardir/rr". $mysqld->after('mysqld'); + $ENV{'_RR_TRACE_DIR'}= $rr_dir; + mkpath($rr_dir); + } else { # Default to not wait until pid file has been created @@ -6433,6 +6456,15 @@ Options for strace stracer=<EXE> Specify name and path to the trace program to use. Default is "strace". Example: $0 --stracer=ktrace. +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-arg=ARG Option to give rr record, can be specified more then once + rr-dir=DIR The directory where rr recordings are stored. Defaults + to 'vardir'/rr.0 (rr.boot for bootstrap instance and + rr.1, ..., rr.N for slave instances). + Misc options user=USER User for connecting to mysqld(default: $opt_user) comment=STR Write STR to the output |