mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2004, 2014, Oracle and/or its affiliates.
|
||||
@ -267,8 +267,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;
|
||||
@ -1159,10 +1163,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,
|
||||
@ -1638,9 +1646,9 @@ sub command_line_setup {
|
||||
$ENV{LSAN_OPTIONS}= "suppressions=${glob_mysql_test_dir}/lsan.supp:print_suppressions=0"
|
||||
if -f "$glob_mysql_test_dir/lsan.supp" and not IS_WINDOWS;
|
||||
|
||||
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
|
||||
$opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd ||
|
||||
$opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
|
||||
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 )
|
||||
{
|
||||
$ENV{ASAN_OPTIONS}= 'disable_coredump=0:'. $ENV{ASAN_OPTIONS};
|
||||
@ -3288,6 +3296,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",
|
||||
@ -5286,6 +5301,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
|
||||
@ -6470,6 +6493,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
|
||||
|
Reference in New Issue
Block a user