Commit 406ce572 authored by Daniel Black's avatar Daniel Black

MDEV-25728: mysqld --help --verbose creates a log-bin-index file

before change test:

 strace -fe trace=file -o /tmp/f.strace sql/mysqld --datadir=/tmp/d --log-bin=foo-bin                      --help --verbose && ls -la /tmp/
...
'mysqladmin variables' instead of 'mysqld --verbose --help'.

total 0
drwxrwxr-x.  2 dan  dan   60 May 19 18:05 .
drwxrwxrwt. 27 root root 640 May 19 18:03 ..
-rw-rw----.  1 dan  dan    0 May 19 18:05 foo-bin.index
parent e570f740
...@@ -1314,7 +1314,7 @@ lc-messages-dir MYSQL_SHAREDIR/ ...@@ -1314,7 +1314,7 @@ lc-messages-dir MYSQL_SHAREDIR/
lc-time-names en_US lc-time-names en_US
local-infile TRUE local-infile TRUE
lock-wait-timeout 86400 lock-wait-timeout 86400
log-bin (No default value) log-bin foo
log-bin-compress FALSE log-bin-compress FALSE
log-bin-compress-min-len 256 log-bin-compress-min-len 256
log-bin-index (No default value) log-bin-index (No default value)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# force symbolic-links=0 (valgrind build has a different default) # force symbolic-links=0 (valgrind build has a different default)
# #
exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1; exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --log-bin=foo --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1;
# The inline perl code below will copy $MYSQL_TMP_DIR/mysqld--help.txt # The inline perl code below will copy $MYSQL_TMP_DIR/mysqld--help.txt
# to output, but filter away some variable stuff (e.g. paths). # to output, but filter away some variable stuff (e.g. paths).
......
...@@ -5324,7 +5324,7 @@ static int init_server_components() ...@@ -5324,7 +5324,7 @@ static int init_server_components()
} }
} }
if (opt_bin_log) if (!opt_help && opt_bin_log)
{ {
if (mysql_bin_log.open_index_file(opt_binlog_index_name, opt_bin_logname, if (mysql_bin_log.open_index_file(opt_binlog_index_name, opt_bin_logname,
TRUE)) TRUE))
...@@ -5333,7 +5333,7 @@ static int init_server_components() ...@@ -5333,7 +5333,7 @@ static int init_server_components()
} }
} }
if (opt_bin_log) if (!opt_help && opt_bin_log)
{ {
log_bin_basename= log_bin_basename=
rpl_make_log_name(opt_bin_logname, pidfile_name, rpl_make_log_name(opt_bin_logname, pidfile_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment