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
a3138648
Commit
a3138648
authored
May 05, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6056 [PATCH] mysqldump writes usage to stdout even when not explicitly requested
parent
5401d447
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
client/mysqldump.c
client/mysqldump.c
+11
-11
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+4
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+7
-0
No files found.
client/mysqldump.c
View file @
a3138648
...
...
@@ -598,12 +598,12 @@ static void print_version(void)
}
/* print_version */
static
void
short_usage_sub
(
void
)
static
void
short_usage_sub
(
FILE
*
f
)
{
printf
(
"Usage: %s [OPTIONS] database [tables]
\n
"
,
my_progname_short
);
printf
(
"OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
\n
"
,
my_progname_short
);
printf
(
"OR %s [OPTIONS] --all-databases [OPTIONS]
\n
"
,
my_progname_short
);
fprintf
(
f
,
"Usage: %s [OPTIONS] database [tables]
\n
"
,
my_progname_short
);
fprintf
(
f
,
"OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
\n
"
,
my_progname_short
);
fprintf
(
f
,
"OR %s [OPTIONS] --all-databases [OPTIONS]
\n
"
,
my_progname_short
);
}
...
...
@@ -612,18 +612,18 @@ static void usage(void)
print_version
();
puts
(
ORACLE_WELCOME_COPYRIGHT_NOTICE
(
"2000"
));
puts
(
"Dumping structure and contents of MySQL databases and tables."
);
short_usage_sub
();
short_usage_sub
(
stdout
);
print_defaults
(
"my"
,
load_default_groups
);
puts
(
""
);
my_print_help
(
my_long_options
);
my_print_help
(
my_long_options
);
my_print_variables
(
my_long_options
);
}
/* usage */
static
void
short_usage
(
void
)
static
void
short_usage
(
FILE
*
f
)
{
short_usage_sub
();
printf
(
"For more options, use %s --help
\n
"
,
my_progname_short
);
short_usage_sub
(
f
);
fprintf
(
f
,
"For more options, use %s --help
\n
"
,
my_progname_short
);
}
...
...
@@ -996,7 +996,7 @@ static int get_options(int *argc, char ***argv)
exit
(
1
);
if
((
*
argc
<
1
&&
!
opt_alldbs
)
||
(
*
argc
>
0
&&
opt_alldbs
))
{
short_usage
();
short_usage
(
stderr
);
return
EX_USAGE
;
}
if
(
tty_password
)
...
...
mysql-test/r/mysqldump.result
View file @
a3138648
...
...
@@ -5281,3 +5281,7 @@ drop table t1, t2;
#
# End of 5.1 tests
#
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help
mysql-test/t/mysqldump.test
View file @
a3138648
...
...
@@ -2462,3 +2462,10 @@ drop table t1, t2;
--
error
2
--
exec
$MYSQL_DUMP
-
hunknownhost
--
dump
-
slave
nulldb
#
# MDEV-6056 [PATCH] mysqldump writes usage to stdout even when not explicitly requested
#
--
error
1
--
exec
$MYSQL_DUMP
--
user
=
foo
2
>&
1
>
$MYSQLTEST_VARDIR
/
tmp
/
bug6056
.
out
--
exec
$MYSQL_DUMP
--
help
>
$MYSQLTEST_VARDIR
/
tmp
/
bug6056
.
out
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