Commit 0aad12d9 authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


mysql-test/lib/mtr_cases.pl:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
mysql-test/mysql-test-run.pl:
  Use remote
parents e90bf564 ff5062ca
...@@ -593,6 +593,10 @@ sub mtr_options_from_test_file($$) { ...@@ -593,6 +593,10 @@ sub mtr_options_from_test_file($$) {
while ( my $line= <$F> ) while ( my $line= <$F> )
{ {
# Skip line if it start's with #
next if ( $line =~ /^#/ );
# Match this line against tag in "tags" array # Match this line against tag in "tags" array
foreach my $tag (@tags) foreach my $tag (@tags)
{ {
......
...@@ -104,7 +104,6 @@ our $glob_mysql_bench_dir= undef; ...@@ -104,7 +104,6 @@ our $glob_mysql_bench_dir= undef;
our $glob_hostname= undef; our $glob_hostname= undef;
our $glob_scriptname= undef; our $glob_scriptname= undef;
our $glob_timers= undef; our $glob_timers= undef;
our $glob_use_running_server= 0;
our $glob_use_running_ndbcluster= 0; our $glob_use_running_ndbcluster= 0;
our $glob_use_running_ndbcluster_slave= 0; our $glob_use_running_ndbcluster_slave= 0;
our $glob_use_embedded_server= 0; our $glob_use_embedded_server= 0;
...@@ -164,7 +163,7 @@ our $exe_libtool; ...@@ -164,7 +163,7 @@ our $exe_libtool;
our $opt_bench= 0; our $opt_bench= 0;
our $opt_small_bench= 0; our $opt_small_bench= 0;
our $opt_big_test= 0; # Send --big-test to mysqltest our $opt_big_test= 0;
our @opt_extra_mysqld_opt; our @opt_extra_mysqld_opt;
...@@ -181,7 +180,10 @@ our $opt_debug; ...@@ -181,7 +180,10 @@ our $opt_debug;
our $opt_do_test; our $opt_do_test;
our @opt_cases; # The test cases names in argv our @opt_cases; # The test cases names in argv
our $opt_embedded_server; our $opt_embedded_server;
our $opt_extern;
our $opt_extern= 0;
our $opt_socket;
our $opt_fast; our $opt_fast;
our $opt_force; our $opt_force;
our $opt_reorder= 0; our $opt_reorder= 0;
...@@ -232,15 +234,11 @@ our $opt_skip_im; ...@@ -232,15 +234,11 @@ our $opt_skip_im;
our $opt_sleep; our $opt_sleep;
our $opt_sleep_time_after_restart= 1;
our $opt_sleep_time_for_delete= 10;
our $opt_testcase_timeout; our $opt_testcase_timeout;
our $opt_suite_timeout; our $opt_suite_timeout;
my $default_testcase_timeout= 15; # 15 min max my $default_testcase_timeout= 15; # 15 min max
my $default_suite_timeout= 180; # 3 hours max my $default_suite_timeout= 180; # 3 hours max
our $opt_socket;
our $opt_source_dist; our $opt_source_dist;
our $opt_start_and_exit; our $opt_start_and_exit;
...@@ -252,7 +250,6 @@ our $opt_strace_client; ...@@ -252,7 +250,6 @@ our $opt_strace_client;
our $opt_timer= 1; our $opt_timer= 1;
our $opt_user; our $opt_user;
our $opt_user_test;
our $opt_valgrind= 0; our $opt_valgrind= 0;
our $opt_valgrind_mysqld= 0; our $opt_valgrind_mysqld= 0;
...@@ -274,7 +271,6 @@ our $opt_stress_test_file= ""; ...@@ -274,7 +271,6 @@ our $opt_stress_test_file= "";
our $opt_wait_for_master; our $opt_wait_for_master;
our $opt_wait_for_slave; our $opt_wait_for_slave;
our $opt_wait_timeout= 10;
our $opt_warnings; our $opt_warnings;
...@@ -614,9 +610,7 @@ sub command_line_setup () { ...@@ -614,9 +610,7 @@ sub command_line_setup () {
'start-and-exit' => \$opt_start_and_exit, 'start-and-exit' => \$opt_start_and_exit,
'timer!' => \$opt_timer, 'timer!' => \$opt_timer,
'unified-diff|udiff' => \$opt_udiff, 'unified-diff|udiff' => \$opt_udiff,
'user-test=s' => \$opt_user_test,
'user=s' => \$opt_user, 'user=s' => \$opt_user,
'wait-timeout=i' => \$opt_wait_timeout,
'testcase-timeout=i' => \$opt_testcase_timeout, 'testcase-timeout=i' => \$opt_testcase_timeout,
'suite-timeout=i' => \$opt_suite_timeout, 'suite-timeout=i' => \$opt_suite_timeout,
'warnings|log-warnings' => \$opt_warnings, 'warnings|log-warnings' => \$opt_warnings,
...@@ -807,14 +801,6 @@ sub command_line_setup () { ...@@ -807,14 +801,6 @@ sub command_line_setup () {
$opt_tmpdir= "$opt_vardir/tmp" unless $opt_tmpdir; $opt_tmpdir= "$opt_vardir/tmp" unless $opt_tmpdir;
$opt_tmpdir =~ s,/+$,,; # Remove ending slash if any $opt_tmpdir =~ s,/+$,,; # Remove ending slash if any
# --------------------------------------------------------------------------
# Set socket
# --------------------------------------------------------------------------
if (!$opt_socket)
{
$opt_socket= $mysqld_variables{'socket'};
}
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Check im suport # Check im suport
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -912,11 +898,11 @@ sub command_line_setup () { ...@@ -912,11 +898,11 @@ sub command_line_setup () {
} }
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Sleep flag # Big test flags
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
if ( $opt_sleep ) if ( $opt_big_test )
{ {
$opt_sleep_time_after_restart= $opt_sleep; $ENV{'BIG_TEST'}= 1;
} }
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -936,8 +922,6 @@ sub command_line_setup () { ...@@ -936,8 +922,6 @@ sub command_line_setup () {
{ {
# Indicate that we are using debugger # Indicate that we are using debugger
$glob_debugger= 1; $glob_debugger= 1;
# Increase timeouts
$opt_wait_timeout= 300;
if ( $opt_extern ) if ( $opt_extern )
{ {
mtr_error("Can't use --extern when using debugger"); mtr_error("Can't use --extern when using debugger");
...@@ -1003,16 +987,9 @@ sub command_line_setup () { ...@@ -1003,16 +987,9 @@ sub command_line_setup () {
$opt_suite_timeout*= 6 if $opt_valgrind; $opt_suite_timeout*= 6 if $opt_valgrind;
} }
# Increase times to wait for executables to start if using valgrind
if ( $opt_valgrind )
{
$opt_sleep_time_after_restart= 10;
$opt_sleep_time_for_delete= 60;
}
if ( ! $opt_user ) if ( ! $opt_user )
{ {
if ( $glob_use_running_server ) if ( $opt_extern )
{ {
$opt_user= "test"; $opt_user= "test";
} }
...@@ -1194,9 +1171,16 @@ sub command_line_setup () { ...@@ -1194,9 +1171,16 @@ sub command_line_setup () {
if ( $opt_extern ) if ( $opt_extern )
{ {
$glob_use_running_server= 1; # Turn off features not supported when running with extern server
$opt_skip_rpl= 1; # We don't run rpl test cases $opt_skip_rpl= 1;
$master->[0]->{'path_sock'}= $opt_socket;
# Setup master->[0] with the settings for the extern server
$master->[0]->{'path_sock'}= $opt_socket if $opt_socket;
}
else
{
mtr_error("--socket can only be used in combination with --extern")
if $opt_socket;
} }
$path_timefile= "$opt_vardir/log/mysqltest-time"; $path_timefile= "$opt_vardir/log/mysqltest-time";
...@@ -1641,7 +1625,7 @@ sub environment_setup () { ...@@ -1641,7 +1625,7 @@ sub environment_setup () {
$ENV{'UMASK'}= "0660"; # The octal *string* $ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string* $ENV{'UMASK_DIR'}= "0770"; # The octal *string*
$ENV{'LC_COLLATE'}= "C"; $ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server; $ENV{'USE_RUNNING_SERVER'}= $opt_extern;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir; $ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir; $ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir; $ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
...@@ -1878,7 +1862,7 @@ sub environment_setup () { ...@@ -1878,7 +1862,7 @@ sub environment_setup () {
# ---------------------------------------------------- # ----------------------------------------------------
# We are nice and report a bit about our settings # We are nice and report a bit about our settings
# ---------------------------------------------------- # ----------------------------------------------------
if (!$opt_extern && $opt_verbose) if (!$opt_extern)
{ {
print "Using MTR_BUILD_THREAD = $ENV{MTR_BUILD_THREAD}\n"; print "Using MTR_BUILD_THREAD = $ENV{MTR_BUILD_THREAD}\n";
print "Using MASTER_MYPORT = $ENV{MASTER_MYPORT}\n"; print "Using MASTER_MYPORT = $ENV{MASTER_MYPORT}\n";
...@@ -2550,7 +2534,7 @@ sub run_suite () { ...@@ -2550,7 +2534,7 @@ sub run_suite () {
mtr_print_line(); mtr_print_line();
if ( ! $glob_debugger and if ( ! $glob_debugger and
! $glob_use_running_server and ! $opt_extern and
! $glob_use_embedded_server ) ! $glob_use_embedded_server )
{ {
stop_all_servers(); stop_all_servers();
...@@ -2581,7 +2565,7 @@ sub initialize_servers () { ...@@ -2581,7 +2565,7 @@ sub initialize_servers () {
datadir_setup(); datadir_setup();
if ( ! $glob_use_running_server ) if ( ! $opt_extern )
{ {
kill_running_servers(); kill_running_servers();
...@@ -2596,11 +2580,6 @@ sub initialize_servers () { ...@@ -2596,11 +2580,6 @@ sub initialize_servers () {
} }
check_running_as_root(); check_running_as_root();
} }
else
{
# We have to create the 'var' and related directories
cleanup_stale_files();
}
} }
sub mysql_install_db () { sub mysql_install_db () {
...@@ -2967,8 +2946,6 @@ sub do_before_run_mysqltest($) ...@@ -2967,8 +2946,6 @@ sub do_before_run_mysqltest($)
unlink("$result_dir/$tname.log"); unlink("$result_dir/$tname.log");
unlink("$result_dir/$tname.warnings"); unlink("$result_dir/$tname.warnings");
if (!$opt_extern)
{
mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are
# output current test to ndbcluster log file to enable diagnostics # output current test to ndbcluster log file to enable diagnostics
...@@ -2979,7 +2956,6 @@ sub do_before_run_mysqltest($) ...@@ -2979,7 +2956,6 @@ sub do_before_run_mysqltest($)
{ {
mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n"); mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
} }
}
if ( $mysql_version_id < 50000 ) if ( $mysql_version_id < 50000 )
{ {
...@@ -3121,7 +3097,7 @@ sub run_testcase ($) { ...@@ -3121,7 +3097,7 @@ sub run_testcase ($) {
if ($master_restart or $slave_restart) if ($master_restart or $slave_restart)
{ {
# Can't restart a running server that may be in use # Can't restart a running server that may be in use
if ( $glob_use_running_server ) if ( $opt_extern )
{ {
mtr_report_test_name($tinfo); mtr_report_test_name($tinfo);
$tinfo->{comment}= "Can't restart a running server"; $tinfo->{comment}= "Can't restart a running server";
...@@ -3300,7 +3276,7 @@ sub report_failure_and_restart ($) { ...@@ -3300,7 +3276,7 @@ sub report_failure_and_restart ($) {
print "Aborting: $tinfo->{'name'} failed in $test_mode mode. "; print "Aborting: $tinfo->{'name'} failed in $test_mode mode. ";
print "To continue, re-run with '--force'.\n"; print "To continue, re-run with '--force'.\n";
if ( ! $glob_debugger and if ( ! $glob_debugger and
! $glob_use_running_server and ! $opt_extern and
! $glob_use_embedded_server ) ! $glob_use_embedded_server )
{ {
stop_all_servers(); stop_all_servers();
...@@ -3875,11 +3851,18 @@ sub run_testcase_need_master_restart($) ...@@ -3875,11 +3851,18 @@ sub run_testcase_need_master_restart($)
join(" ", @{$master->[0]->{'start_opts'}}) . "'" ); join(" ", @{$master->[0]->{'start_opts'}}) . "'" );
} }
elsif( ! $master->[0]->{'pid'} ) elsif( ! $master->[0]->{'pid'} )
{
if ( $opt_extern )
{
$do_restart= 0;
mtr_verbose("No restart: using extern master");
}
else
{ {
$do_restart= 1; $do_restart= 1;
mtr_verbose("Restart master: master is not started"); mtr_verbose("Restart master: master is not started");
} }
}
return $do_restart; return $do_restart;
} }
...@@ -4000,6 +3983,7 @@ sub run_testcase_stop_servers($$$) { ...@@ -4000,6 +3983,7 @@ sub run_testcase_stop_servers($$$) {
if ( $do_restart || $do_slave_restart ) if ( $do_restart || $do_slave_restart )
{ {
delete $slave->[0]->{'running_slave_options'}; # Forget history delete $slave->[0]->{'running_slave_options'}; # Forget history
# Start shutdown of all started slaves # Start shutdown of all started slaves
...@@ -4369,11 +4353,6 @@ sub run_mysqltest ($) { ...@@ -4369,11 +4353,6 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--timer-file=%s/log/timer", $opt_vardir); mtr_add_arg($args, "--timer-file=%s/log/timer", $opt_vardir);
} }
if ( $opt_big_test )
{
mtr_add_arg($args, "--big-test");
}
if ( $opt_compress ) if ( $opt_compress )
{ {
mtr_add_arg($args, "--compress"); mtr_add_arg($args, "--compress");
...@@ -4494,6 +4473,7 @@ sub run_mysqltest ($) { ...@@ -4494,6 +4473,7 @@ sub run_mysqltest ($) {
} }
return $res; return $res;
} }
...@@ -4763,9 +4743,8 @@ Options to control what test suites or cases to run ...@@ -4763,9 +4743,8 @@ Options to control what test suites or cases to run
skip-rpl Skip the replication test cases. skip-rpl Skip the replication test cases.
skip-im Don't start IM, and skip the IM test cases skip-im Don't start IM, and skip the IM test cases
skip-test=PREFIX Skip test cases which name are prefixed with PREFIX skip-test=PREFIX Skip test cases which name are prefixed with PREFIX
big-test Pass "--big-test" to mysqltest which will set the big-test Set the environment variable BIG_TEST, which can be
environment variable BIG_TEST, which can be checked checked from test cases.
from test cases.
Options that specify ports Options that specify ports
...@@ -4788,7 +4767,8 @@ Options to run test on running server ...@@ -4788,7 +4767,8 @@ Options to run test on running server
extern Use running server for tests FIXME DANGEROUS extern Use running server for tests FIXME DANGEROUS
ndb-connectstring=STR Use running cluster, and connect using STR ndb-connectstring=STR Use running cluster, and connect using STR
ndb-connectstring-slave=STR Use running slave cluster, and connect using STR ndb-connectstring-slave=STR Use running slave cluster, and connect using STR
user=USER User for connect to server user=USER User for connection to extern server
socket=PATH Socket for connection to extern server
Options for debugging the product Options for debugging the product
...@@ -4838,22 +4818,14 @@ Misc options ...@@ -4838,22 +4818,14 @@ Misc options
testcase-timeout=MINUTES Max test case run time (default $default_testcase_timeout) testcase-timeout=MINUTES Max test case run time (default $default_testcase_timeout)
suite-timeout=MINUTES Max test suite run time (default $default_suite_timeout) suite-timeout=MINUTES Max test suite run time (default $default_suite_timeout)
warnings | log-warnings Pass --log-warnings to mysqld
sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time
Deprecated options Deprecated options
with-openssl Deprecated option for ssl with-openssl Deprecated option for ssl
Options not yet described, or that I want to look into more
local
netware
sleep=SECONDS
socket=PATH
user-test=s
wait-timeout=SECONDS
warnings
log-warnings
HERE HERE
mtr_exit(1); mtr_exit(1);
......
...@@ -6629,6 +6629,7 @@ SHOW_VAR status_vars[]= { ...@@ -6629,6 +6629,7 @@ SHOW_VAR status_vars[]= {
{"Com_create_function", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_FUNCTION]), SHOW_LONG_STATUS}, {"Com_create_function", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_FUNCTION]), SHOW_LONG_STATUS},
{"Com_create_index", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_INDEX]), SHOW_LONG_STATUS}, {"Com_create_index", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_INDEX]), SHOW_LONG_STATUS},
{"Com_create_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_TABLE]), SHOW_LONG_STATUS}, {"Com_create_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_TABLE]), SHOW_LONG_STATUS},
{"Com_create_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_USER]), SHOW_LONG_STATUS},
{"Com_dealloc_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DEALLOCATE_PREPARE]), SHOW_LONG_STATUS}, {"Com_dealloc_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DEALLOCATE_PREPARE]), SHOW_LONG_STATUS},
{"Com_delete", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE]), SHOW_LONG_STATUS}, {"Com_delete", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE]), SHOW_LONG_STATUS},
{"Com_delete_multi", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE_MULTI]), SHOW_LONG_STATUS}, {"Com_delete_multi", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE_MULTI]), SHOW_LONG_STATUS},
......
...@@ -82,7 +82,7 @@ datadir_set= ...@@ -82,7 +82,7 @@ datadir_set=
# #
lsb_functions="/lib/lsb/init-functions" lsb_functions="/lib/lsb/init-functions"
if test -f $lsb_functions ; then if test -f $lsb_functions ; then
source $lsb_functions . $lsb_functions
else else
log_success_msg() log_success_msg()
{ {
......
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