1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00

Merge revisions from maria/5.5 (5.5.41)

bzr merge -r4393 lp:maria/5.5
This commit is contained in:
Nirbhay Choubey
2014-12-22 20:09:25 -05:00
68 changed files with 1796 additions and 256 deletions

View File

@@ -255,6 +255,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;
@@ -1157,6 +1158,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,
@@ -1597,8 +1599,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");
@@ -1625,9 +1628,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() )
@@ -2488,6 +2491,14 @@ 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",
"$path_client_bindir/replace");
$ENV{'REPLACE'}= native_path($exe_replace);
# Create an environment variable to make it possible
# to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
@@ -5475,6 +5486,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());
@@ -6021,7 +6036,6 @@ sub start_mysqltest ($) {
return $proc;
}
#
# Modify the exe and args so that program is run in gdb in xterm
#
@@ -6072,6 +6086,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
@@ -6481,6 +6521,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