1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-05 12:42:17 +03:00

mtr --gdb: fix for --rr and for a warning

use _RR_TRACE_DIR=dir instead of -o dir, as the former can store
multiple traces in dir (if, e.g., the test restarts mysqld)

suppress uninitialized warning when $exe is undefined (--manual-XXX)
This commit is contained in:
Sergei Golubchik
2021-02-25 14:10:25 +01:00
parent 259e5243fa
commit dd9e5827a6
2 changed files with 3 additions and 2 deletions

View File

@ -74,7 +74,8 @@ my %debuggers = (
options => '-f -o {log} {exe} {args}', options => '-f -o {log} {exe} {args}',
}, },
rr => { rr => {
options => 'record -o {log} {exe} {args}', options => '_RR_TRACE_DIR={log} rr record {exe} {args}',
run => 'env',
pre => sub { pre => sub {
::mtr_error('rr requires kernel.perf_event_paranoid <= 1') ::mtr_error('rr requires kernel.perf_event_paranoid <= 1')
if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1; if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1;

View File

@ -5071,7 +5071,7 @@ sub mysqld_start ($$) {
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args"; $ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
My::Debugger::setup_args(\$args, \$exe, $mysqld->name()); My::Debugger::setup_args(\$args, \$exe, $mysqld->name());
$ENV{'VALGRIND_TEST'}= $opt_valgrind = int($exe && $exe eq 'valgrind'); $ENV{'VALGRIND_TEST'}= $opt_valgrind = int(($exe || '') eq 'valgrind');
# Remove the old pidfile if any # Remove the old pidfile if any
unlink($mysqld->value('pid-file')); unlink($mysqld->value('pid-file'));