mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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. Backported from 6.0-codebase, revid 2572.14.1
This commit is contained in:
@ -128,7 +128,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.",
|
"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},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"write-binlog", OPT_WRITE_BINLOG,
|
{"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,
|
(uchar**) &opt_write_binlog, (uchar**) &opt_write_binlog, 0, GET_BOOL, NO_ARG,
|
||||||
1, 0, 0, 0, 0, 0},
|
1, 0, 0, 0, 0, 0},
|
||||||
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
|
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
|
||||||
|
@ -402,7 +402,7 @@ static struct my_option my_long_options[] =
|
|||||||
(uchar**) &opt_routines, (uchar**) &opt_routines, 0, GET_BOOL,
|
(uchar**) &opt_routines, (uchar**) &opt_routines, 0, GET_BOOL,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"set-charset", OPT_SET_CHARSET,
|
{"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,
|
(uchar**) &opt_set_charset, (uchar**) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
|
||||||
0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0},
|
||||||
{"set-variable", 'O',
|
{"set-variable", 'O',
|
||||||
|
@ -1220,6 +1220,14 @@ void my_print_help(const struct my_option *options)
|
|||||||
printf("%s", comment);
|
printf("%s", comment);
|
||||||
}
|
}
|
||||||
putchar('\n');
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user