mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my51-mysqltest_var
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new mysql-test/extra/rpl_tests/rpl_stm_000001.test: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/rpl_loaddata.result: Auto merged mysql-test/r/rpl_loaddata_m.result: Auto merged mysql-test/r/rpl_loaddata_s.result: Auto merged mysql-test/r/rpl_misc_functions.result: Auto merged mysql-test/r/rpl_replicate_do.result: Auto merged mysql-test/r/rpl_stm_000001.result: Auto merged mysql-test/t/mysqltest.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/rpl_loaddata.test: Auto merged mysql-test/t/rpl_loaddata_m.test: Auto merged mysql-test/t/rpl_loaddata_s.test: Auto merged mysql-test/t/rpl_misc_functions.test: Auto merged mysql-test/t/rpl_replicate_do.test: Auto merged mysql-test/t/trigger-compat.test: Auto merged mysql-test/t/type_varchar.test: Auto merged mysql-test/r/mysqltest.result: Merge 5.0 -> 5.1 mysql-test/t/trigger-grant.test: "Use local" when merging 5.0 -> 5.1
This commit is contained in:
@ -76,6 +76,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff
|
||||
#require 5.6.1;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
use Cwd;
|
||||
use Getopt::Long;
|
||||
use Sys::Hostname;
|
||||
@ -156,8 +157,7 @@ our $path_client_bindir;
|
||||
our $path_language;
|
||||
our $path_timefile;
|
||||
our $path_manager_log; # Used by mysqldadmin
|
||||
our $path_mysqltest_log;
|
||||
our $path_slave_load_tmpdir; # What is this?!
|
||||
our $path_mysqltest_log;
|
||||
our $path_my_basedir;
|
||||
our $opt_vardir; # A path but set directly on cmd line
|
||||
our $opt_tmpdir; # A path but set directly on cmd line
|
||||
@ -485,9 +485,6 @@ sub initial_setup () {
|
||||
$glob_basedir= dirname($glob_mysql_test_dir);
|
||||
$glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable
|
||||
|
||||
# needs to be same length to test logging (FIXME what???)
|
||||
$path_slave_load_tmpdir= "../../var/tmp";
|
||||
|
||||
$path_my_basedir=
|
||||
$opt_source_dist ? $glob_mysql_test_dir : $glob_basedir;
|
||||
|
||||
@ -1120,6 +1117,7 @@ sub environment_setup () {
|
||||
$ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server;
|
||||
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
|
||||
$ENV{'MYSQL_TEST_WINDIR'}= $glob_mysql_test_dir;
|
||||
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
|
||||
$ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'};
|
||||
$ENV{'MASTER_WINMYSOCK'}= $master->[0]->{'path_mysock'};
|
||||
$ENV{'MASTER_MYSOCK1'}= $master->[1]->{'path_mysock'};
|
||||
@ -1223,10 +1221,40 @@ sub kill_and_cleanup () {
|
||||
|
||||
mtr_report("Removing Stale Files");
|
||||
|
||||
rmtree("$opt_vardir/log");
|
||||
rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port");
|
||||
rmtree("$opt_vardir/run");
|
||||
rmtree("$opt_vardir/tmp");
|
||||
if ( $opt_vardir eq "$glob_mysql_test_dir/var" )
|
||||
{
|
||||
#
|
||||
# Running with "var" in mysql-test dir
|
||||
#
|
||||
if ( -l "$glob_mysql_test_dir/var" )
|
||||
{
|
||||
# Some users creates a soft link in mysql-test/var to another area
|
||||
# - allow it
|
||||
mtr_report("WARNING: Using the 'mysql-test/var' symlink");
|
||||
rmtree("$opt_vardir/log");
|
||||
rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port");
|
||||
rmtree("$opt_vardir/run");
|
||||
rmtree("$opt_vardir/tmp");
|
||||
}
|
||||
else
|
||||
{
|
||||
# Remove the entire "var" dir
|
||||
rmtree("$opt_vardir/");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#
|
||||
# Running with "var" in some other place
|
||||
#
|
||||
|
||||
# Remove the var/ dir in mysql-test dir if any
|
||||
# this could be an old symlink that shouldn't be there
|
||||
rmtree("$glob_mysql_test_dir/var");
|
||||
|
||||
# Remove the "var" dir
|
||||
rmtree("$opt_vardir/");
|
||||
}
|
||||
|
||||
mkpath("$opt_vardir/log");
|
||||
mkpath("$opt_vardir/run");
|
||||
@ -1242,7 +1270,7 @@ sub kill_and_cleanup () {
|
||||
$slave->[0]->{'path_myddir'},
|
||||
$slave->[1]->{'path_myddir'},
|
||||
$slave->[2]->{'path_myddir'});
|
||||
|
||||
|
||||
foreach my $instance (@{$instance_manager->{'instances'}})
|
||||
{
|
||||
push(@data_dir_lst, $instance->{'path_datadir'});
|
||||
@ -1255,18 +1283,27 @@ sub kill_and_cleanup () {
|
||||
mkpath("$data_dir/test");
|
||||
}
|
||||
|
||||
# To make some old test cases work, we create a soft
|
||||
# link from the old "var" location to the new one
|
||||
|
||||
if ( ! $glob_win32 and $opt_vardir ne "$glob_mysql_test_dir/var" )
|
||||
# Make a link std_data_ln in var/ that points to std_data
|
||||
if ( ! $glob_win32 )
|
||||
{
|
||||
# FIXME why bother with the above, why not always remove all of var?!
|
||||
rmtree("$glob_mysql_test_dir/var"); # Clean old var, FIXME or rename it?!
|
||||
symlink($opt_vardir, "$glob_mysql_test_dir/var");
|
||||
symlink("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data_ln");
|
||||
}
|
||||
else
|
||||
{
|
||||
# on windows, copy all files from std_data into var/std_data_ln
|
||||
mkpath("$opt_vardir/std_data_ln");
|
||||
opendir(DIR, "$glob_mysql_test_dir/std_data")
|
||||
or mtr_error("Can't find the std_data directory: $!");
|
||||
for(readdir(DIR)) {
|
||||
next if -d "$glob_mysql_test_dir/std_data/$_";
|
||||
copy("$glob_mysql_test_dir/std_data/$_", "$opt_vardir/std_data_ln/$_");
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub check_ssl_support () {
|
||||
|
||||
if ($opt_skip_ssl)
|
||||
@ -2361,8 +2398,12 @@ sub mysqld_arguments ($$$$$$) {
|
||||
mtr_add_arg($args, "%s--skip-innodb", $prefix);
|
||||
mtr_add_arg($args, "%s--skip-ndbcluster", $prefix);
|
||||
mtr_add_arg($args, "%s--skip-slave-start", $prefix);
|
||||
|
||||
# Directory where slaves find the dumps generated by "load data"
|
||||
# on the server. The path need to have constant length otherwise
|
||||
# test results will vary, thus a relative path is used.
|
||||
mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix,
|
||||
$path_slave_load_tmpdir);
|
||||
"../tmp");
|
||||
mtr_add_arg($args, "%s--socket=%s", $prefix,
|
||||
$slave->[$idx]->{'path_mysock'});
|
||||
mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix);
|
||||
@ -3101,7 +3142,7 @@ Options to control what engine/variation to run
|
||||
sp-protocol Create a stored procedure to execute all queries
|
||||
compress Use the compressed protocol between client and server
|
||||
ssl Use ssl protocol between client and server
|
||||
skip-ssl Dont start sterver with support for ssl connections
|
||||
skip-ssl Dont start server with support for ssl connections
|
||||
bench Run the benchmark suite FIXME
|
||||
small-bench FIXME
|
||||
|
||||
|
Reference in New Issue
Block a user