1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

10.0 merge

This commit is contained in:
Sergei Golubchik
2013-04-19 20:35:04 +02:00
1230 changed files with 61472 additions and 36081 deletions

View File

@ -208,6 +208,8 @@ our @opt_mysqld_envs;
my $opt_stress;
my $opt_dry_run;
my $opt_compress;
my $opt_ssl;
my $opt_skip_ssl;
@ -334,8 +336,9 @@ sub check_timeout ($) { return testcase_timeout($_[0]) / 10; }
our $opt_warnings= 1;
our $opt_include_ndbcluster= 0;
our $opt_skip_ndbcluster= 1;
our $ndbcluster_enabled= 0;
my $opt_include_ndbcluster= 0;
my $opt_skip_ndbcluster= 0;
my $exe_ndbd;
my $exe_ndbmtd;
@ -346,7 +349,7 @@ my $exe_ndb_mgm;
our %mysqld_variables;
our @optional_plugins;
my $source_dist= 0;
my $source_dist= -d "../sql";
my $opt_max_save_core= env_or_val(MTR_MAX_SAVE_CORE => 5);
my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20);
@ -362,14 +365,6 @@ my $opt_stop_keep_alive= $ENV{MTR_STOP_KEEP_ALIVE};
select(STDOUT);
$| = 1; # Automatically flush STDOUT
# Used by --result-file for for formatting times
sub isotime($) {
my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
$yr+1900, $mon+1, $day, $hr, $min, $sec;
}
main();
@ -382,6 +377,8 @@ sub main {
# directly before it executes them, like "make test-force-pl" in RPM builds.
mtr_report("Logging: $0 ", join(" ", @ARGV));
$DEFAULT_SUITES.=",sequence,sql_discovery" if $source_dist;
command_line_setup();
# --help will not reach here, so now it's safe to assume we have binaries
@ -394,26 +391,6 @@ sub main {
if (!$opt_suites) {
$opt_suites= $DEFAULT_SUITES;
# Check for any extra suites to enable based on the path name
my %extra_suites=
(
"mysql-5.1-new-ndb" => "ndb_team",
"mysql-5.1-new-ndb-merge" => "ndb_team",
"mysql-5.1-telco-6.2" => "ndb_team",
"mysql-5.1-telco-6.2-merge" => "ndb_team",
"mysql-5.1-telco-6.3" => "ndb_team",
"mysql-6.0-ndb" => "ndb_team",
);
foreach my $dir ( reverse splitdir($basedir) ) {
my $extra_suite= $extra_suites{$dir};
if (defined $extra_suite) {
mtr_report("Found extra suite: $extra_suite");
$opt_suites= "$extra_suite,$opt_suites";
last;
}
}
}
mtr_report("Using suites: $opt_suites") unless @opt_cases;
@ -447,6 +424,14 @@ sub main {
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases, \@opt_skip_test_list);
mark_time_used('collect');
if ($opt_dry_run)
{
for (@$tests) {
print $_->fullname(), "\n";
}
exit 0;
}
if ( $opt_report_features ) {
# Put "report features" as the first test to run
my $tinfo = My::Test->new
@ -763,6 +748,10 @@ sub run_test_server ($$$) {
else {
mtr_report("\nRetrying test $tname, ".
"attempt($retries/$opt_retry)...\n");
#saving the log file as filename.failed in case of retry
my $worker_logdir= $result->{savedir};
my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
rename $log_file_name,$log_file_name.".failed";
delete($result->{result});
$result->{retries}= $retries+1;
$result->write_test($sock, 'TESTCASE');
@ -1139,7 +1128,7 @@ sub command_line_setup {
# Control what test suites or cases to run
'force+' => \$opt_force,
'with-ndbcluster-only' => \&collect_option,
'include-ndbcluster' => \$opt_include_ndbcluster,
'ndb|include-ndbcluster' => \$opt_include_ndbcluster,
'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
'suite|suites=s' => \$opt_suites,
'skip-rpl' => \&collect_option,
@ -1260,6 +1249,7 @@ sub command_line_setup {
'report-times' => \$opt_report_times,
'result-file' => \$opt_resfile,
'stress=s' => \$opt_stress,
'dry-run' => \$opt_dry_run,
'help|h' => \$opt_usage,
# list-options is internal, not listed in help
@ -1278,11 +1268,6 @@ sub command_line_setup {
report_option('verbose', $opt_verbose);
}
if ( -d "../sql" )
{
$source_dist= 1;
}
# Find the absolute path to the test directory
$glob_mysql_test_dir= cwd();
if ($glob_mysql_test_dir =~ / /)
@ -1581,7 +1566,6 @@ sub command_line_setup {
# --------------------------------------------------------------------------
if ( $opt_embedded_server )
{
$opt_skip_ndbcluster= 1; # Turn off use of NDB cluster
$opt_skip_ssl= 1; # Turn off use of SSL
# Turn off use of bin log
@ -2037,7 +2021,7 @@ sub executable_setup () {
$exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
if ( ! $opt_skip_ndbcluster )
if ( $ndbcluster_enabled )
{
# Look for single threaded NDB
$exe_ndbd=
@ -2299,7 +2283,7 @@ sub environment_setup {
# --------------------------------------------------------------------------
# Add the path where libndbclient can be found
# --------------------------------------------------------------------------
if ( !$opt_skip_ndbcluster )
if ( $ndbcluster_enabled )
{
push(@ld_library_paths, "$basedir/storage/ndb/src/.libs");
}
@ -2392,7 +2376,7 @@ sub environment_setup {
# ----------------------------------------------------
# Setup env for NDB
# ----------------------------------------------------
if ( ! $opt_skip_ndbcluster )
if ( $ndbcluster_enabled )
{
$ENV{'NDB_MGM'}=
my_find_bin($bindir,
@ -2823,7 +2807,7 @@ sub fix_vs_config_dir () {
$opt_vs_config="";
for (<$bindir/sql/*/mysqld.exe>) {
for (<$bindir/sql/*/mysqld.exe>) { #/
if (-M $_ < $modified)
{
$modified = -M _;
@ -2865,37 +2849,87 @@ sub vs_config_dirs ($$) {
sub check_ndbcluster_support {
my $ndbcluster_supported = 0;
if ($mysqld_variables{'ndb-connectstring'})
{
$ndbcluster_supported = 1;
}
if ($opt_skip_ndbcluster && $opt_include_ndbcluster)
{
# User is ambivalent. Theoretically the arg which was
# given last on command line should win, but that order is
# unknown at this time.
mtr_error("Ambigous command, both --include-ndbcluster " .
" and --skip-ndbcluster was specified");
}
# Check if this is MySQL Cluster, ie. mysql version string ends
# with -ndb-Y.Y.Y[-status]
if ( defined $mysql_version_extra &&
$mysql_version_extra =~ /^-ndb-/ )
$mysql_version_extra =~ /-ndb-([0-9]*)\.([0-9]*)\.([0-9]*)/ )
{
mtr_report(" - MySQL Cluster");
# Enable ndb engine and add more test suites
$opt_include_ndbcluster = 1;
$DEFAULT_SUITES.=",ndb";
# MySQL Cluster tree
mtr_report(" - MySQL Cluster detected");
if ($opt_skip_ndbcluster)
{
mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
return;
}
if (!$ndbcluster_supported)
{
# MySQL Cluster tree, but mysqld was not compiled with
# ndbcluster -> fail unless --skip-ndbcluster was used
mtr_error("This is MySQL Cluster but mysqld does not " .
"support ndbcluster. Use --skip-ndbcluster to " .
"force mtr to run without it.");
}
# mysqld was compiled with ndbcluster -> auto enable
}
else
{
# Not a MySQL Cluster tree
if (!$ndbcluster_supported)
{
if ($opt_include_ndbcluster)
{
mtr_error("Could not detect ndbcluster support ".
"requested with --include-ndbcluster");
}
# Silently skip, mysqld was compiled without ndbcluster
# which is the default case
return;
}
if ($opt_skip_ndbcluster)
{
# Compiled with ndbcluster but ndbcluster skipped
mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
return;
}
# Not a MySQL Cluster tree, enable ndbcluster
# if --include-ndbcluster was used
if ($opt_include_ndbcluster)
{
# enable ndbcluster
}
else
{
mtr_report(" - skipping ndbcluster(disabled by default)");
return;
}
}
if ($opt_include_ndbcluster)
{
$opt_skip_ndbcluster= 0;
}
if ($opt_skip_ndbcluster)
{
mtr_report(" - skipping ndbcluster");
return;
}
if ( ! $mysqld_variables{'ndb-connectstring'} )
{
#mtr_report(" - skipping ndbcluster, mysqld not compiled with ndbcluster");
$opt_skip_ndbcluster= 2;
return;
}
mtr_report(" - using ndbcluster when necessary, mysqld supports it");
mtr_report(" - enabling ndbcluster");
$ndbcluster_enabled= 1;
# Add MySQL Cluster test suites
$DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
return;
}
@ -4751,6 +4785,10 @@ sub extract_warning_lines ($$) {
qr|Error: io_setup\(\) failed|,
qr|Warning: io_setup\(\) failed|,
qr|Warning: io_setup\(\) attempt|,
qr|setrlimit could not change the size of core files to 'infinity';|,
qr|feedback plugin: failed to retrieve the MAC address|,
qr|Plugin 'FEEDBACK' init function returned error|,
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
);
my $matched_lines= [];
@ -6257,6 +6295,8 @@ Options to control what engine/variation to run
all generated configs
combination=<opt> Use at least twice to run tests with specified
options to mysqld
dry-run Don't run any tests, print the list of tests
that were selected for execution
Options to control directories to use
tmpdir=DIR The directory where temporary files are stored