Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.0.10
-
None
Description
Upstream bug http://bugs.mysql.com/bug.php?id=51975 was errantly classified as a duplicate of non-bug http://bugs.mysql.com/bug.php?id=44848
mysqldump should never write usage to stdout unless --help was passed as an argument.
This change seems to correct the behavior:
|
--- mysql-5.6.16/client/mysqldump.c 2014-01-14 15:38:00.000000000 +0000
|
+++ mysql-5.6.16_modified/client/mysqldump.c 2014-02-14 02:56:28.000000000 +0000
|
@@ -621,31 +621,31 @@
|
} /* print_version */
|
|
|
-static void short_usage_sub(void)
|
+static void short_usage_sub(FILE *stream)
|
{
|
- printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
- printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n",
|
+ fprintf(stream, "Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
+ fprintf(stream, "OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n",
|
my_progname);
|
- printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname);
|
+ fprintf(stream, "OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname);
|
}
|
|
|
-static void usage(void)
|
+static void usage(FILE *stream)
|
{
|
print_version();
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
puts("Dumping structure and contents of MySQL databases and tables.");
|
- short_usage_sub();
|
+ short_usage_sub(stream);
|
print_defaults("my",load_default_groups);
|
my_print_help(my_long_options);
|
my_print_variables(my_long_options);
|
} /* usage */
|
|
|
-static void short_usage(void)
|
+static void short_usage(FILE *stream)
|
{
|
- short_usage_sub();
|
- printf("For more options, use %s --help\n", my_progname);
|
+ short_usage_sub(stream);
|
+ fprintf(stream, "For more options, use %s --help\n", my_progname);
|
}
|
|
|
@@ -824,7 +824,7 @@
|
break;
|
case 'I':
|
case '?':
|
- usage();
|
+ usage(stdout);
|
exit(0);
|
case (int) OPT_MASTER_DATA:
|
if (!argument) /* work like in old versions */
|
@@ -1020,7 +1020,7 @@
|
exit(1);
|
if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs))
|
{
|
- short_usage();
|
+ short_usage(stderr);
|
return EX_USAGE;
|
}
|
if (tty_password)
|
Attachments
Issue Links
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | mdev6056.txt [ 28900 ] |
Description |
Upstream bug http://bugs.mysql.com/bug.php?id=51975 was errantly classified as a duplicate of non-bug http://bugs.mysql.com/bug.php?id=44848 mysqldump should never write usage to stdout unless --help was passed as an argument. This change seems to correct the behavior: --- mysql-5.6.16/client/mysqldump.c 2014-01-14 15:38:00.000000000 +0000 +++ mysql-5.6.16_modified/client/mysqldump.c 2014-02-14 02:56:28.000000000 +0000 @@ -621,31 +621,31 @@ } /* print_version */ -static void short_usage_sub(void) +static void short_usage_sub(FILE *stream) { - printf("Usage: %s [OPTIONS] database [tables]\n", my_progname); - printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", + fprintf(stream, "Usage: %s [OPTIONS] database [tables]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", my_progname); - printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); } -static void usage(void) +static void usage(FILE *stream) { print_version(); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("Dumping structure and contents of MySQL databases and tables."); - short_usage_sub(); + short_usage_sub(stream); print_defaults("my",load_default_groups); my_print_help(my_long_options); my_print_variables(my_long_options); } /* usage */ -static void short_usage(void) +static void short_usage(FILE *stream) { - short_usage_sub(); - printf("For more options, use %s --help\n", my_progname); + short_usage_sub(stream); + fprintf(stream, "For more options, use %s --help\n", my_progname); } @@ -824,7 +824,7 @@ break; case 'I': case '?': - usage(); + usage(stdout); exit(0); case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ @@ -1020,7 +1020,7 @@ exit(1); if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs)) { - short_usage(); + short_usage(stderr); return EX_USAGE; } if (tty_password) |
Upstream bug http://bugs.mysql.com/bug.php?id=51975 was errantly classified as a duplicate of non-bug http://bugs.mysql.com/bug.php?id=44848 mysqldump should never write usage to stdout unless --help was passed as an argument. This change seems to correct the behavior: {noformat} --- mysql-5.6.16/client/mysqldump.c 2014-01-14 15:38:00.000000000 +0000 +++ mysql-5.6.16_modified/client/mysqldump.c 2014-02-14 02:56:28.000000000 +0000 @@ -621,31 +621,31 @@ } /* print_version */ -static void short_usage_sub(void) +static void short_usage_sub(FILE *stream) { - printf("Usage: %s [OPTIONS] database [tables]\n", my_progname); - printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", + fprintf(stream, "Usage: %s [OPTIONS] database [tables]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", my_progname); - printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); } -static void usage(void) +static void usage(FILE *stream) { print_version(); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("Dumping structure and contents of MySQL databases and tables."); - short_usage_sub(); + short_usage_sub(stream); print_defaults("my",load_default_groups); my_print_help(my_long_options); my_print_variables(my_long_options); } /* usage */ -static void short_usage(void) +static void short_usage(FILE *stream) { - short_usage_sub(); - printf("For more options, use %s --help\n", my_progname); + short_usage_sub(stream); + fprintf(stream, "For more options, use %s --help\n", my_progname); } @@ -824,7 +824,7 @@ break; case 'I': case '?': - usage(); + usage(stdout); exit(0); case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ @@ -1020,7 +1020,7 @@ exit(1); if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs)) { - short_usage(); + short_usage(stderr); return EX_USAGE; } if (tty_password) |
Description |
Upstream bug http://bugs.mysql.com/bug.php?id=51975 was errantly classified as a duplicate of non-bug http://bugs.mysql.com/bug.php?id=44848 mysqldump should never write usage to stdout unless --help was passed as an argument. This change seems to correct the behavior: {noformat} --- mysql-5.6.16/client/mysqldump.c 2014-01-14 15:38:00.000000000 +0000 +++ mysql-5.6.16_modified/client/mysqldump.c 2014-02-14 02:56:28.000000000 +0000 @@ -621,31 +621,31 @@ } /* print_version */ -static void short_usage_sub(void) +static void short_usage_sub(FILE *stream) { - printf("Usage: %s [OPTIONS] database [tables]\n", my_progname); - printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", + fprintf(stream, "Usage: %s [OPTIONS] database [tables]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", my_progname); - printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); } -static void usage(void) +static void usage(FILE *stream) { print_version(); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("Dumping structure and contents of MySQL databases and tables."); - short_usage_sub(); + short_usage_sub(stream); print_defaults("my",load_default_groups); my_print_help(my_long_options); my_print_variables(my_long_options); } /* usage */ -static void short_usage(void) +static void short_usage(FILE *stream) { - short_usage_sub(); - printf("For more options, use %s --help\n", my_progname); + short_usage_sub(stream); + fprintf(stream, "For more options, use %s --help\n", my_progname); } @@ -824,7 +824,7 @@ break; case 'I': case '?': - usage(); + usage(stdout); exit(0); case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ @@ -1020,7 +1020,7 @@ exit(1); if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs)) { - short_usage(); + short_usage(stderr); return EX_USAGE; } if (tty_password) |
Upstream bug http://bugs.mysql.com/bug.php?id=51975 was errantly classified as a duplicate of non-bug http://bugs.mysql.com/bug.php?id=44848 mysqldump should never write usage to stdout unless --help was passed as an argument. This change seems to correct the behavior: {noformat} --- mysql-5.6.16/client/mysqldump.c 2014-01-14 15:38:00.000000000 +0000 +++ mysql-5.6.16_modified/client/mysqldump.c 2014-02-14 02:56:28.000000000 +0000 @@ -621,31 +621,31 @@ } /* print_version */ -static void short_usage_sub(void) +static void short_usage_sub(FILE *stream) { - printf("Usage: %s [OPTIONS] database [tables]\n", my_progname); - printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", + fprintf(stream, "Usage: %s [OPTIONS] database [tables]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", my_progname); - printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); + fprintf(stream, "OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); } -static void usage(void) +static void usage(FILE *stream) { print_version(); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("Dumping structure and contents of MySQL databases and tables."); - short_usage_sub(); + short_usage_sub(stream); print_defaults("my",load_default_groups); my_print_help(my_long_options); my_print_variables(my_long_options); } /* usage */ -static void short_usage(void) +static void short_usage(FILE *stream) { - short_usage_sub(); - printf("For more options, use %s --help\n", my_progname); + short_usage_sub(stream); + fprintf(stream, "For more options, use %s --help\n", my_progname); } @@ -824,7 +824,7 @@ break; case 'I': case '?': - usage(); + usage(stdout); exit(0); case (int) OPT_MASTER_DATA: if (!argument) /* work like in old versions */ @@ -1020,7 +1020,7 @@ exit(1); if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs)) { - short_usage(); + short_usage(stderr); return EX_USAGE; } if (tty_password) {noformat} |
Remote Link | This issue links to "Bug #44848 - mysqldump produces stdout even if it encouters errors (Web Link)" [ 16200 ] |
Fix Version/s | 10.0.11 [ 15200 ] | |
Assignee | Sergei Golubchik [ serg ] | |
Summary | mysqldump writes usage to stdout even when not explicitly requested | [PATCH] mysqldump writes usage to stdout even when not explicitly requested |
Remote Link | This issue links to "Bug #44848 mysqldump produces stdout even if it encouters errors (Web Link)" [ 16202 ] |
Remote Link | This issue links to "Bug #51975 Mysqldump options printing to stdout instead of stderr (Web Link)" [ 16203 ] |
Remote Link | This issue links to "Bug #44848 mysqldump produces stdout even if it encouters errors (Web Link)" [ 16202 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 10.0.12 [ 15201 ] | |
Fix Version/s | 10.0.11 [ 15200 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.0.11 [ 15200 ] | |
Fix Version/s | 10.0.12 [ 15201 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | defaullt [ 38703 ] | MariaDB v2 [ 42969 ] |
Workflow | MariaDB v2 [ 42969 ] | MariaDB v3 [ 62665 ] |
Workflow | MariaDB v3 [ 62665 ] | MariaDB v4 [ 147767 ] |