Commit e5203306 authored by unknown's avatar unknown

After-merge fixes for MySQL 5.1.41 merge into MariaDB.

Makefile.am:
  Fix incorrect automerges.
mysql-test/mysql-test-run.pl:
  Fix bad merge.
  We revert some of the MySQL-side changes, as the problem is that they may accidentally ignore some warnings in mysqld.err that should be reported.
  Also remove some differences between MySQL and MariaDB where there is no semantic difference (to make future merges easier).
parent ab2756f4
...@@ -210,7 +210,7 @@ test-bt-fast: ...@@ -210,7 +210,7 @@ test-bt-fast:
test-bt-fast2: test-bt-fast2:
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol --report-features @PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --force --comment=ps --ps-protocol --report-features
test-bt-debug: test-bt-debug:
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
...@@ -219,8 +219,6 @@ test-bt-debug: ...@@ -219,8 +219,6 @@ test-bt-debug:
test-bt-debug-fast: test-bt-debug-fast:
test-bt-debug-fast:
# Keep these for a while # Keep these for a while
test-pl: test test-pl: test
test-full-pl: test-full test-full-pl: test-full
......
...@@ -126,13 +126,9 @@ my $path_config_file; # The generated config file, var/my.cnf ...@@ -126,13 +126,9 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite. # executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= "binlog,federated,main,maria,rpl,innodb,parts"; my $DEFAULT_SUITES= "main,binlog,federated,rpl,innodb,maria,parts";
my $opt_suites;
our $opt_usage;
our $opt_list_options;
our $opt_suites;
our $opt_suites_default= "main,backup,backup_engines,binlog,rpl,parts"; # Default suites to run
our $opt_script_debug= 0; # Script debugging, enable with --script-debug
our $opt_verbose= 0; # Verbose output, enable with --verbose our $opt_verbose= 0; # Verbose output, enable with --verbose
our $exe_mysql; our $exe_mysql;
our $exe_mysqladmin; our $exe_mysqladmin;
...@@ -205,10 +201,10 @@ my $opt_mark_progress; ...@@ -205,10 +201,10 @@ my $opt_mark_progress;
my $opt_sleep; my $opt_sleep;
my $opt_testcase_timeout= 15; # 15 minutes my $opt_testcase_timeout= 15; # minutes
my $opt_suite_timeout = 360; # 6 hours my $opt_suite_timeout = 300; # minutes
my $opt_shutdown_timeout= 10; # 10 seconds my $opt_shutdown_timeout= 10; # seconds
my $opt_start_timeout = 180; # 180 seconds my $opt_start_timeout = 180; # seconds
sub testcase_timeout { return $opt_testcase_timeout * 60; }; sub testcase_timeout { return $opt_testcase_timeout * 60; };
sub suite_timeout { return $opt_suite_timeout * 60; }; sub suite_timeout { return $opt_suite_timeout * 60; };
...@@ -227,7 +223,7 @@ my $opt_strace_client; ...@@ -227,7 +223,7 @@ my $opt_strace_client;
our $opt_user = "root"; our $opt_user = "root";
my $opt_valgrind= 0; my $opt_valgrind= 0;
our $opt_valgrind_mysqld= 0; my $opt_valgrind_mysqld= 0;
my $opt_valgrind_mysqltest= 0; my $opt_valgrind_mysqltest= 0;
my @default_valgrind_args= ("--show-reachable=yes"); my @default_valgrind_args= ("--show-reachable=yes");
my @valgrind_args; my @valgrind_args;
...@@ -293,11 +289,6 @@ sub main { ...@@ -293,11 +289,6 @@ sub main {
"mysql-5.1-telco-6.2-merge" => "ndb_team", "mysql-5.1-telco-6.2-merge" => "ndb_team",
"mysql-5.1-telco-6.3" => "ndb_team", "mysql-5.1-telco-6.3" => "ndb_team",
"mysql-6.0-ndb" => "ndb_team", "mysql-6.0-ndb" => "ndb_team",
"mysql-6.0-falcon" => "falcon_team",
"mysql-6.0-falcon-team" => "falcon_team",
"mysql-6.0-falcon-wlad" => "falcon_team",
"mysql-6.0-falcon-chris" => "falcon_team",
"mysql-6.0-falcon-kevin" => "falcon_team",
); );
foreach my $dir ( reverse splitdir($basedir) ) { foreach my $dir ( reverse splitdir($basedir) ) {
...@@ -1327,8 +1318,6 @@ sub command_line_setup { ...@@ -1327,8 +1318,6 @@ sub command_line_setup {
{ {
# Indicate that we are using debugger # Indicate that we are using debugger
$glob_debugger= 1; $glob_debugger= 1;
$opt_testcase_timeout= 60*60*24; # Don't abort debugging with timeout
$opt_suite_timeout= $opt_testcase_timeout;
$opt_retry= 1; $opt_retry= 1;
$opt_retry_failure= 1; $opt_retry_failure= 1;
...@@ -2161,6 +2150,7 @@ sub environment_setup { ...@@ -2161,6 +2150,7 @@ sub environment_setup {
# Create an environment variable to make it possible # Create an environment variable to make it possible
# to detect that valgrind is being used from test cases # to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind; $ENV{'VALGRIND_TEST'}= $opt_valgrind;
} }
...@@ -2917,8 +2907,8 @@ sub mysql_install_db { ...@@ -2917,8 +2907,8 @@ sub mysql_install_db {
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql"; my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
my $path_sql= my_find_file($install_basedir, my $path_sql= my_find_file($install_basedir,
["mysql", "sql/share", "share/mariadb", ["mysql", "sql/share", "share/mysql",
"share/mysql", "share", "scripts"], "share/mariadb", "share", "scripts"],
"mysql_system_tables.sql", "mysql_system_tables.sql",
NOT_REQUIRED); NOT_REQUIRED);
...@@ -3870,37 +3860,35 @@ sub extract_server_log ($$) { ...@@ -3870,37 +3860,35 @@ sub extract_server_log ($$) {
my ($error_log, $tname) = @_; my ($error_log, $tname) = @_;
# Open the servers .err log file and read all lines # Open the servers .err log file and read all lines
# belonging to current test into @lines # belonging to current tets into @lines
my $Ferr = IO::File->new($error_log) my $Ferr = IO::File->new($error_log)
or return []; or mtr_error("Could not open file '$error_log' for reading: $!");
my $last_pos= $last_warning_position->{$error_log}{seek_pos};
$Ferr->seek($last_pos, 0) if defined($last_pos);
# If the seek fails, we will parse the whole error log, at least we will not
# miss any warnings.
my @lines= <$Ferr>; my @lines;
$last_warning_position->{$error_log}{seek_pos}= $Ferr->tell(); my $found_test= 0; # Set once we've found the log of this test
$Ferr = undef; # Close error log file while ( my $line = <$Ferr> )
# mysql_client_test.test sends a COM_DEBUG packet to the server
# to provoke a SAFEMALLOC leak report, ignore any warnings
# between "Begin/end safemalloc memory dump"
if ( grep(/Begin safemalloc memory dump:/, @lines) > 0)
{ {
my $discard_lines= 1; if ($found_test)
foreach my $line ( @lines )
{ {
if ($line =~ /Begin safemalloc memory dump:/){ # If test wasn't last after all, discard what we found, test again.
$discard_lines = 1; if ( $line =~ /^CURRENT_TEST:/)
} elsif ($line =~ /End safemalloc memory dump./){ {
$discard_lines = 0; @lines= ();
$found_test= $line =~ /^CURRENT_TEST: $tname/;
} }
else
if ($discard_lines){ {
$line = "ignored"; push(@lines, $line);
} }
} }
else
{
# Search for beginning of test, until found
$found_test= 1 if ($line =~ /^CURRENT_TEST: $tname/);
}
} }
$Ferr = undef; # Close error log file
return @lines; return @lines;
} }
...@@ -3922,16 +3910,48 @@ sub get_log_from_proc ($$) { ...@@ -3922,16 +3910,48 @@ sub get_log_from_proc ($$) {
return $srv_log; return $srv_log;
} }
#
# Perform a rough examination of the servers # Perform a rough examination of the servers
# error log and write all lines that look # error log and write all lines that look
# suspicious into $error_log.warnings # suspicious into $error_log.warnings
# #
sub extract_warning_lines ($$) { sub extract_warning_lines ($) {
my ($error_log, $tname) = @_; my ($error_log) = @_;
my @lines= extract_server_log($error_log, $tname); # Open the servers .err log file and read all lines
# belonging to current tets into @lines
my $Ferr = IO::File->new($error_log)
or return [];
my $last_pos= $last_warning_position->{$error_log}{seek_pos};
$Ferr->seek($last_pos, 0) if defined($last_pos);
# If the seek fails, we will parse the whole error log, at least we will not
# miss any warnings.
my @lines= <$Ferr>;
$last_warning_position->{$error_log}{seek_pos}= $Ferr->tell();
$Ferr = undef; # Close error log file
# mysql_client_test.test sends a COM_DEBUG packet to the server
# to provoke a SAFEMALLOC leak report, ignore any warnings
# between "Begin/end safemalloc memory dump"
if ( grep(/Begin safemalloc memory dump:/, @lines) > 0)
{
my $discard_lines= 1;
foreach my $line ( @lines )
{
if ($line =~ /Begin safemalloc memory dump:/){
$discard_lines = 1;
} elsif ($line =~ /End safemalloc memory dump./){
$discard_lines = 0;
}
if ($discard_lines){
$line = "ignored";
}
}
}
# Write all suspicious lines to $error_log.warnings file # Write all suspicious lines to $error_log.warnings file
my $warning_log = "$error_log.warnings"; my $warning_log = "$error_log.warnings";
my $Fwarn = IO::File->new($warning_log, "w") my $Fwarn = IO::File->new($warning_log, "w")
or die("Could not open file '$warning_log' for writing: $!"); or die("Could not open file '$warning_log' for writing: $!");
...@@ -4008,7 +4028,7 @@ sub start_check_warnings ($$) { ...@@ -4008,7 +4028,7 @@ sub start_check_warnings ($$) {
my $log_error= $mysqld->value('#log-error'); my $log_error= $mysqld->value('#log-error');
# To be communicated to the test # To be communicated to the test
$ENV{MTR_LOG_ERROR}= $log_error; $ENV{MTR_LOG_ERROR}= $log_error;
extract_warning_lines($log_error, $tinfo->{name}); extract_warning_lines($log_error);
my $args; my $args;
mtr_init_args(\$args); mtr_init_args(\$args);
...@@ -4167,7 +4187,7 @@ sub check_warnings_post_shutdown { ...@@ -4167,7 +4187,7 @@ sub check_warnings_post_shutdown {
my $testname_hash= { }; my $testname_hash= { };
foreach my $mysqld ( mysqlds()) foreach my $mysqld ( mysqlds())
{ {
my $testlist= extract_warning_lines($mysqld->value('#log-error'), ""); my $testlist= extract_warning_lines($mysqld->value('#log-error'));
$testname_hash->{$_}= 1 for @$testlist; $testname_hash->{$_}= 1 for @$testlist;
} }
my @warning_tests= keys(%$testname_hash); my @warning_tests= keys(%$testname_hash);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment