1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge branch 'github/10.0' into 10.1

This commit is contained in:
Sergei Golubchik
2018-02-01 21:55:30 +01:00
448 changed files with 8900 additions and 3321 deletions

View File

@@ -1589,6 +1589,7 @@ sub command_line_setup {
$opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
$opt_debugger || $opt_client_debugger )
{
$ENV{ASAN_OPTIONS}= 'abort_on_error=1:'.($ENV{ASAN_OPTIONS} || '');
if ( using_extern() )
{
mtr_error("Can't use --extern when using debugger");
@@ -5041,7 +5042,7 @@ sub mysqld_start ($$) {
my $args;
mtr_init_args(\$args);
if ( $opt_valgrind_mysqld )
if ( $opt_valgrind_mysqld and not $opt_gdb and not $opt_manual_gdb )
{
valgrind_arguments($args, \$exe);
}
@@ -5644,11 +5645,20 @@ sub gdb_arguments {
unlink($gdb_init_file);
# Put $args into a single string
my $str= join(" ", @$$args);
$input = $input ? "< $input" : "";
# write init file for mysqld or client
mtr_tofile($gdb_init_file, "set args $str $input\n");
if ($type ne 'client' and $opt_valgrind_mysqld) {
my $v = $$exe;
my $vargs = [];
valgrind_arguments($vargs, \$v);
mtr_tofile($gdb_init_file, <<EOF);
shell @My::SafeProcess::safe_process_cmd --parent-pid=`pgrep -x gdb` -- $v --vgdb-error=0 @$vargs @$$args &
shell sleep 1
target remote | /usr/lib64/valgrind/../../bin/vgdb
EOF
} else {
mtr_tofile($gdb_init_file, "set args @$$args $input\n");
}
if ( $opt_manual_gdb )
{