Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c1430dc8
Commit
c1430dc8
authored
Jul 24, 2008
by
Magnus Svensson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#37832 Parallel-running mtr --help prints usage many times
parent
05386f90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+14
-12
No files found.
mysql-test/mysql-test-run.pl
View file @
c1430dc8
...
@@ -215,7 +215,7 @@ sub main {
...
@@ -215,7 +215,7 @@ sub main {
mtr_report
("
Logging: $0
",
join
("
",
@ARGV
));
mtr_report
("
Logging: $0
",
join
("
",
@ARGV
));
Getopt::Long::
Configure
("
pass_through
");
Getopt::Long::
Configure
("
pass_through
");
GetOptions
('
parallel=i
'
=>
\
$opt_parallel
)
or
usage
("
Can't read options
");
GetOptions
('
parallel=i
'
=>
\
$opt_parallel
)
or
usage
(
0
,
"
Can't read options
");
if
(
not
defined
$opt_parallel
)
{
if
(
not
defined
$opt_parallel
)
{
# Try to find a suitable value for number of workers
# Try to find a suitable value for number of workers
...
@@ -662,7 +662,7 @@ sub run_worker ($) {
...
@@ -662,7 +662,7 @@ sub run_worker ($) {
sub
ignore_option
{
sub
ignore_option
{
my
(
$opt
,
$value
)
=
@_
;
my
(
$opt
,
$value
)
=
@_
;
print
"
Ignoring option '
$opt
'
\n
"
;
mtr_report
("
Ignoring option '
$opt
'
")
;
}
}
sub
command_line_setup
{
sub
command_line_setup
{
...
@@ -671,6 +671,9 @@ sub command_line_setup {
...
@@ -671,6 +671,9 @@ sub command_line_setup {
my
$opt_comment
;
my
$opt_comment
;
my
$opt_usage
;
my
$opt_usage
;
# Default verbosity, server ON and workers OFF
report_option
('
verbose
',
$thread_num
?
undef
:
0
);
# Read the command line options
# Read the command line options
# Note: Keep list, and the order, in sync with usage at end of this file
# Note: Keep list, and the order, in sync with usage at end of this file
Getopt::Long::
Configure
("
pass_through
");
Getopt::Long::
Configure
("
pass_through
");
...
@@ -791,19 +794,15 @@ sub command_line_setup {
...
@@ -791,19 +794,15 @@ sub command_line_setup {
'
timediff
'
=>
\&
report_option
,
'
timediff
'
=>
\&
report_option
,
'
help|h
'
=>
\
$opt_usage
,
'
help|h
'
=>
\
$opt_usage
,
)
or
usage
("
Can't read options
");
)
or
usage
(
$thread_num
,
"
Can't read options
");
usage
("")
if
$opt_usage
;
usage
(
$thread_num
,
"")
if
$opt_usage
;
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Setup verbosity
# Setup verbosity
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
if
(
$thread_num
==
0
){
if
(
$opt_verbose
!=
0
){
# The server should by default have verbose on
report_option
('
verbose
',
$opt_verbose
);
report_option
('
verbose
',
$opt_verbose
?
$opt_verbose
:
0
);
}
else
{
# Worker should by default have verbose off
report_option
('
verbose
',
$opt_verbose
?
$opt_verbose
:
undef
);
}
}
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
...
@@ -900,7 +899,7 @@ sub command_line_setup {
...
@@ -900,7 +899,7 @@ sub command_line_setup {
}
}
elsif
(
$arg
=~
/^-/
)
elsif
(
$arg
=~
/^-/
)
{
{
usage
("
Invalid option
\"
$arg
\"
");
usage
(
$thread_num
,
"
Invalid option
\"
$arg
\"
");
}
}
else
else
{
{
...
@@ -4321,7 +4320,10 @@ sub valgrind_arguments {
...
@@ -4321,7 +4320,10 @@ sub valgrind_arguments {
# Usage
# Usage
#
#
sub
usage
($)
{
sub
usage
($)
{
my
$message
=
shift
;
my
(
$thread_num
,
$message
)
=
@_
;
# Only main thread should print usage
return
if
$thread_num
!=
0
;
if
(
$message
)
if
(
$message
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment