From: Date: March 12 2008 9:06pm Subject: bk commit into 6.0 tree (cmiller:1.2601) BUG#35224 List-Archive: http://lists.mysql.com/commits/43879 X-Bug: 35224 Message-Id: <20080312200613.DEF4C8305A@cornsilk.net> Below is the list of changes that have just been committed into a local 6.0 repository of cmiller. When cmiller does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2008-03-12 16:06:07-04:00, cmiller@stripped +3 -0 Bug#35224: mysqldump --help is very confusing The presence of "--skip" parameters is obscure, when it should be obvious from the text. Now, for boolean options, when they're default to ON and the --skip is more useful parameter, then tell the user of its existence. client/mysqlcheck.c@stripped, 2008-03-12 16:06:04-04:00, cmiller@stripped +1 -1 Remove message about defaultness, as that's encoded in the other values and will now be extracted. client/mysqldump.c@stripped, 2008-03-12 16:06:04-04:00, cmiller@stripped +1 -1 Remove message about defaultness, as that's encoded in the other values and will now be extracted. mysys/my_getopt.c@stripped, 2008-03-12 16:06:04-04:00, cmiller@stripped +8 -0 For printing options, if the option is boolean and defauts to ON, then tell the user so, and tell them of the --skip option. diff -Nrup a/client/mysqlcheck.c b/client/mysqlcheck.c --- a/client/mysqlcheck.c 2008-02-02 07:19:46 -05:00 +++ b/client/mysqlcheck.c 2008-03-12 16:06:04 -04:00 @@ -130,7 +130,7 @@ static struct my_option my_long_options[ "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"write-binlog", OPT_WRITE_BINLOG, - "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.", + "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Use --skip-write-binlog when commands should not be sent to replication slaves.", (uchar**) &opt_write_binlog, (uchar**) &opt_write_binlog, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, diff -Nrup a/client/mysqldump.c b/client/mysqldump.c --- a/client/mysqldump.c 2008-02-22 10:03:40 -05:00 +++ b/client/mysqldump.c 2008-03-12 16:06:04 -04:00 @@ -428,7 +428,7 @@ static struct my_option my_long_options[ (uchar**) &opt_routines, (uchar**) &opt_routines, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"set-charset", OPT_SET_CHARSET, - "Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.", + "Add 'SET NAMES default_character_set' to the output.", (uchar**) &opt_set_charset, (uchar**) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"set-variable", 'O', diff -Nrup a/mysys/my_getopt.c b/mysys/my_getopt.c --- a/mysys/my_getopt.c 2008-02-19 16:53:31 -05:00 +++ b/mysys/my_getopt.c 2008-03-12 16:06:04 -04:00 @@ -1166,6 +1166,14 @@ void my_print_help(const struct my_optio printf("%s", comment); } putchar('\n'); + if ((optp->var_type & GET_TYPE_MASK) == GET_NO_ARG || + (optp->var_type & GET_TYPE_MASK) == GET_BOOL) + { + if (optp->def_value != 0) + { + printf("%*s(Defaults to on; use --skip-%s to disable.)\n", name_space, "", optp->name); + } + } } }