summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-07-02 12:20:49 +0200
committerSergei Golubchik <serg@mariadb.org>2022-08-02 17:49:21 +0200
commit086eb8e23c7ce6ea1dc14ce389172d1b2c9d6e6c (patch)
treeadc0391076a547ead81279d5c3015786c0275efe
parent28d44abd99a3334d1eba79f378833fc029681f38 (diff)
downloadmariadb-git-086eb8e23c7ce6ea1dc14ce389172d1b2c9d6e6c.tar.gz
my_getopt --help for "bit" options
print "Defaults to on" not only for GET_BOOL, but also for GET_BIT
-rw-r--r--mysql-test/main/mysqld--help.result2
-rw-r--r--mysys/my_getopt.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 7b0ce27ead3..60ee8426ccd 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -490,6 +490,7 @@ The following specify which files/extra groups are read (specified before remain
administrative statements to the slow log if it is open.
Resets or sets the option 'admin' in
log_slow_disabled_statements
+ (Defaults to on; use --skip-log-slow-admin-statements to disable.)
--log-slow-disabled-statements=name
Don't log certain types of statements to slow log. Any
combination of: admin, call, slave, sp
@@ -510,6 +511,7 @@ The following specify which files/extra groups are read (specified before remain
Log slow statements executed by slave thread to the slow
log if it is open. Resets or sets the option 'slave' in
log_slow_disabled_statements
+ (Defaults to on; use --skip-log-slow-slave-statements to disable.)
--log-slow-verbosity=name
Verbosity level for the slow log. Any combination of:
innodb, query_plan, explain
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 9747ee4214e..cb0e0e61240 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -1583,7 +1583,8 @@ void my_print_help(const struct my_option *options)
}
}
putchar('\n');
- if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL)
+ if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL ||
+ (optp->var_type & GET_TYPE_MASK) == GET_BIT)
{
if (optp->def_value != 0)
{