--- 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)