1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

maria-10.0.16 merge

bzr merge -r4588 maria/10.0
This commit is contained in:
Nirbhay Choubey
2015-01-26 22:54:27 -05:00
409 changed files with 13043 additions and 2869 deletions

View File

@ -109,6 +109,7 @@ require "lib/mtr_gprof.pl";
require "lib/mtr_misc.pl";
$SIG{INT}= sub { mtr_error("Got ^C signal"); };
$SIG{HUP}= sub { mtr_error("Hangup detected on controlling terminal"); };
our $mysql_version_id;
my $mysql_version_extra;
@ -262,6 +263,7 @@ our $opt_ddd;
our $opt_client_ddd;
my $opt_boot_ddd;
our $opt_manual_gdb;
our $opt_manual_lldb;
our $opt_manual_dbx;
our $opt_manual_ddd;
our $opt_manual_debug;
@ -923,6 +925,7 @@ sub run_worker ($) {
my ($server_port, $thread_num)= @_;
$SIG{INT}= sub { exit(1); };
$SIG{HUP}= sub { exit(1); };
# Connect to server
my $server = new IO::Socket::INET
@ -1172,6 +1175,7 @@ sub command_line_setup {
'gdb' => \$opt_gdb,
'client-gdb' => \$opt_client_gdb,
'manual-gdb' => \$opt_manual_gdb,
'manual-lldb' => \$opt_manual_lldb,
'boot-gdb' => \$opt_boot_gdb,
'manual-debug' => \$opt_manual_debug,
'ddd' => \$opt_ddd,
@ -1502,6 +1506,7 @@ sub command_line_setup {
{
$default_vardir= "$glob_mysql_test_dir/var";
}
$default_vardir = realpath $default_vardir unless IS_WINDOWS;
if ( ! $opt_vardir )
{
@ -1608,8 +1613,9 @@ sub command_line_setup {
$opt_debugger= undef;
}
if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd ||
$opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx)
if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_lldb ||
$opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_dbx ||
$opt_manual_dbx)
{
mtr_error("You need to use the client debug options for the",
"embedded server. Ex: --client-gdb");
@ -1636,9 +1642,9 @@ sub command_line_setup {
# --------------------------------------------------------------------------
# Check debug related options
# --------------------------------------------------------------------------
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
$opt_manual_gdb || $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_manual_gdb || $opt_manual_lldb || $opt_manual_ddd ||
$opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
$opt_debugger || $opt_client_debugger )
{
if ( using_extern() )
@ -2495,6 +2501,26 @@ sub environment_setup {
"$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql");
$ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql);
# ----------------------------------------------------
# replace
# ----------------------------------------------------
my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
"$basedir/extra/replace",
"$bindir/extra$opt_vs_config/replace",
"$path_client_bindir/replace");
$ENV{'REPLACE'}= native_path($exe_replace);
# ----------------------------------------------------
# innochecksum
# ----------------------------------------------------
my $exe_innochecksum=
mtr_exe_maybe_exists("$bindir/extra$opt_vs_config/innochecksum",
"$path_client_bindir/innochecksum");
if ($exe_innochecksum)
{
$ENV{'INNOCHECKSUM'}= native_path($exe_innochecksum);
}
# Create an environment variable to make it possible
# to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
@ -5455,6 +5481,10 @@ sub mysqld_start ($$) {
{
gdb_arguments(\$args, \$exe, $mysqld->name());
}
elsif ( $opt_manual_lldb )
{
lldb_arguments(\$args, \$exe, $mysqld->name());
}
elsif ( $opt_ddd || $opt_manual_ddd )
{
ddd_arguments(\$args, \$exe, $mysqld->name());
@ -6001,7 +6031,6 @@ sub start_mysqltest ($) {
return $proc;
}
#
# Modify the exe and args so that program is run in gdb in xterm
#
@ -6052,6 +6081,32 @@ sub gdb_arguments {
$$exe= "xterm";
}
#
# Modify the exe and args so that program is run in lldb
#
sub lldb_arguments {
my $args= shift;
my $exe= shift;
my $type= shift;
my $input= shift;
my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
unlink($lldb_init_file);
# Put $args into a single string
my $str= join(" ", @$$args);
$input = $input ? "< $input" : "";
# write init file for mysqld or client
mtr_tofile($lldb_init_file, "set args $str $input\n");
print "\nTo start lldb for $type, type in another window:\n";
print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n";
# Indicate the exe should not be started
$$exe= undef;
return;
}
#
# Modify the exe and args so that program is run in ddd
@ -6180,7 +6235,6 @@ sub debugger_arguments {
}
}
#
# Modify the exe and args so that program is run in valgrind
#
@ -6202,10 +6256,14 @@ sub valgrind_arguments {
if -f "$glob_mysql_test_dir/valgrind.supp";
# Ensure the jemalloc works with mysqld
if ($mysqld_variables{'version-malloc-library'} ne "system" &&
$$exe =~ /mysqld/)
if ($$exe =~ /mysqld/)
{
mtr_add_arg($args, "--soname-synonyms=somalloc=NONE" );
my %somalloc=(
'system jemalloc' => 'libjemalloc*',
'bundled jemalloc' => 'NONE'
);
my ($syn) = $somalloc{$mysqld_variables{'version-malloc-library'}};
mtr_add_arg($args, '--soname-synonyms=somalloc=%s', $syn) if $syn;
}
}
@ -6483,6 +6541,8 @@ Options for debugging the product
test(s)
manual-dbx Let user manually start mysqld in dbx, before running
test(s)
manual-lldb Let user manually start mysqld in lldb, before running
test(s)
max-save-core Limit the number of core files saved (to avoid filling
up disks for heavily crashing server). Defaults to
$opt_max_save_core, set to 0 for no limit. Set