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-11 16:12:01-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-11 16:11:57-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-11 16:11:58-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-11 16:11:58-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-11 16:11:57 -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-11 16:11:58 -04:00
@@ -396,7 +396,7 @@ static struct my_option my_long_options[
"Deprecated. Use --skip-set-charset instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"opt", OPT_OPTIMIZE,
- "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
+ "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"order-by-primary", OPT_ORDER_BY_PRIMARY,
"Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.",
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-11 16:11:58 -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);
+ }
+ }
}
}
| Thread |
|---|
| • bk commit into 6.0 tree (cmiller:1.2601) BUG#35224 | Chad MILLER | 12 Mar |