mirror of
https://github.com/MariaDB/server.git
synced 2025-07-16 00:42:55 +03:00
merge 53949
This commit is contained in:
@ -221,6 +221,7 @@ my $opt_start_dirty;
|
|||||||
my $opt_start_exit;
|
my $opt_start_exit;
|
||||||
my $start_only;
|
my $start_only;
|
||||||
my $opt_wait_all;
|
my $opt_wait_all;
|
||||||
|
my $opt_user_args;
|
||||||
my $opt_repeat= 1;
|
my $opt_repeat= 1;
|
||||||
my $opt_retry= 3;
|
my $opt_retry= 3;
|
||||||
my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
|
my $opt_retry_failure= env_or_val(MTR_RETRY_FAILURE => 2);
|
||||||
@ -921,6 +922,7 @@ sub command_line_setup {
|
|||||||
'start-dirty' => \$opt_start_dirty,
|
'start-dirty' => \$opt_start_dirty,
|
||||||
'start-and-exit' => \$opt_start_exit,
|
'start-and-exit' => \$opt_start_exit,
|
||||||
'start' => \$opt_start,
|
'start' => \$opt_start,
|
||||||
|
'user-args' => \$opt_user_args,
|
||||||
'wait-all' => \$opt_wait_all,
|
'wait-all' => \$opt_wait_all,
|
||||||
'print-testcases' => \&collect_option,
|
'print-testcases' => \&collect_option,
|
||||||
'repeat=i' => \$opt_repeat,
|
'repeat=i' => \$opt_repeat,
|
||||||
@ -1331,13 +1333,24 @@ sub command_line_setup {
|
|||||||
$start_only= 1;
|
$start_only= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
# Check use of user-args
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if ($opt_user_args) {
|
||||||
|
mtr_error("--user-args only valid with --start options")
|
||||||
|
unless $start_only;
|
||||||
|
mtr_error("--user-args cannot be combined with named suites or tests")
|
||||||
|
if $opt_suites || @opt_cases;
|
||||||
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Check use of wait-all
|
# Check use of wait-all
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
if ($opt_wait_all && ! $start_only)
|
if ($opt_wait_all && ! $start_only)
|
||||||
{
|
{
|
||||||
mtr_error("--wait-all can only be used with --start or --start-dirty");
|
mtr_error("--wait-all can only be used with --start options");
|
||||||
}
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@ -4254,7 +4267,7 @@ sub mysqld_arguments ($$$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $mysql_version_id >= 50106 )
|
if ( $mysql_version_id >= 50106 && !$opt_user_args)
|
||||||
{
|
{
|
||||||
# Turn on logging to file
|
# Turn on logging to file
|
||||||
mtr_add_arg($args, "--log-output=file");
|
mtr_add_arg($args, "--log-output=file");
|
||||||
@ -4292,7 +4305,7 @@ sub mysqld_arguments ($$$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$opt_skip_core = $found_skip_core;
|
$opt_skip_core = $found_skip_core;
|
||||||
if ( !$found_skip_core )
|
if ( !$found_skip_core && !$opt_user_args )
|
||||||
{
|
{
|
||||||
mtr_add_arg($args, "%s", "--core-file");
|
mtr_add_arg($args, "%s", "--core-file");
|
||||||
}
|
}
|
||||||
@ -4300,7 +4313,7 @@ sub mysqld_arguments ($$$) {
|
|||||||
# Enable the debug sync facility, set default wait timeout.
|
# Enable the debug sync facility, set default wait timeout.
|
||||||
# Facility stays disabled if timeout value is zero.
|
# Facility stays disabled if timeout value is zero.
|
||||||
mtr_add_arg($args, "--loose-debug-sync-timeout=%s",
|
mtr_add_arg($args, "--loose-debug-sync-timeout=%s",
|
||||||
$opt_debug_sync_timeout);
|
$opt_debug_sync_timeout) unless $opt_user_args;
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
@ -4598,6 +4611,9 @@ sub envsubst {
|
|||||||
|
|
||||||
|
|
||||||
sub get_extra_opts {
|
sub get_extra_opts {
|
||||||
|
# No extra options if --user-args
|
||||||
|
return \@opt_extra_mysqld_opt if $opt_user_args;
|
||||||
|
|
||||||
my ($mysqld, $tinfo)= @_;
|
my ($mysqld, $tinfo)= @_;
|
||||||
|
|
||||||
my $opts=
|
my $opts=
|
||||||
@ -5470,8 +5486,13 @@ Misc options
|
|||||||
startup settings for the first specified test case
|
startup settings for the first specified test case
|
||||||
Example:
|
Example:
|
||||||
$0 --start alias &
|
$0 --start alias &
|
||||||
|
start-and-exit Same as --start, but mysql-test-run terminates and
|
||||||
|
leaves just the server running
|
||||||
start-dirty Only start the servers (without initialization) for
|
start-dirty Only start the servers (without initialization) for
|
||||||
the first specified test case
|
the first specified test case
|
||||||
|
user-args In combination with start* and no test name, drops
|
||||||
|
arguments to mysqld except those speficied with
|
||||||
|
--mysqld (if any)
|
||||||
wait-all If --start or --start-dirty option is used, wait for all
|
wait-all If --start or --start-dirty option is used, wait for all
|
||||||
servers to exit before finishing the process
|
servers to exit before finishing the process
|
||||||
fast Run as fast as possible, dont't wait for servers
|
fast Run as fast as possible, dont't wait for servers
|
||||||
|
Reference in New Issue
Block a user