Bug #71222 Incorrect error message of relay_log_basename without relay-log
Submitted: 24 Dec 2013 10:33 Modified: 25 Dec 2013 11:37
Reporter: tsubasa tanaka (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.6.15 OS:Linux (CentOS 6.3)
Assigned to: CPU Architecture:Any
Tags: Docs

[24 Dec 2013 10:33] tsubasa tanaka
Description:
Two options introduced from 5.6.2 is reported error as "unknown variables".

o- relay_log_basename
 http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_relay_log_bas...

o- log_bin_basename
 http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_log_bin_...

How to repeat:
$ bin/mysqld_safe --no-defaults --log-bin-basename=test
..
2013-12-24 19:31:41 17322 [ERROR] /usr/mysql/5.6.15/bin/mysqld: unknown variable 'log-bin-basename=test'
..

$ bin/mysqld_safe --no-defaults --relay-log-basename=test
..
2013-12-24 19:32:29 17847 [ERROR] /usr/mysql/5.6.15/bin/mysqld: unknown variable 'relay-log-basename=test'
..
[24 Dec 2013 12:18] Peter Laursen
The variables exist on my 5.6.15 server (64 bit) running on Win7/64 (even though empty as binlog is not enabled and it is not a slave):

SHOW VARIABLES LIKE '%basename'

/* returns

Variable_name       Value   
------------------  --------
log_bin_basename            
relay_log_basename          
*/

.. but I did not try to use same as options for startup.

Peter
(not a MySQL/Oracle person)
[24 Dec 2013 12:25] Peter Laursen
Did you try to quote the file name?

$ bin/mysqld_safe --no-defaults --log-bin-basename='test'
[24 Dec 2013 14:51] tsubasa tanaka
Hi,
I tried with quoted file name, but it doesn't work.

$ bin/mysqld_safe --no-defaults --log-bin-basename="/tmp/test" &
..
2013-12-24 23:49:17 18508 [ERROR] /usr/mysql/5.6.15/bin/mysqld: unknown variable 'log-bin-basename=/tmp/test'

And I realized that I can't see log-bin-basename valiable in mysqld's usage.

$ bin/mysqld --help --verbose | grep basename
2013-12-24 23:50:44 18542 [Note] Binlog end
2013-12-24 23:50:44 18542 [Note] Shutting down plugin 'CSV'
2013-12-24 23:50:44 18542 [Note] Shutting down plugin 'MyISAM'
[24 Dec 2013 14:53] tsubasa tanaka
And I can see those variables in SHOW GLOBAL VARIABLES.

mysql56> SELECT @@version;
+------------------+
| @@version        |
+------------------+
| 5.6.15-debug-log |
+------------------+
1 row in set (0.00 sec)

mysql56> show global variables like '%basename';
+--------------------+------------------------------+
| Variable_name      | Value                        |
+--------------------+------------------------------+
| log_bin_basename   | /usr/mysql/5.6.15/data/bin   |
| relay_log_basename | /usr/mysql/5.6.15/data/relay |
+--------------------+------------------------------+
2 rows in set (0.02 sec)
[24 Dec 2013 17:00] Sveta Smirnova
Thank you for the report.

Regarding to log_bin_basename: this variable set by passing option to parameter log_bin and can not be used both as command line parameter and in the option file. See http://dev.mysql.com/doc/refman/5.6/en/mysqld-option-tables.html and read carefully link you provided.

Same rule applies to relay_log_basename: see http://dev.mysql.com/doc/refman/5.6/en/mysqld-option-tables.html
[25 Dec 2013 7:16] tsubasa tanaka
Hi,
Thank you for your suggest.

I have read the docs again, but I still have two point.

o- Incorrect error message when I give log_bin_basename, relay_log_basename without log_bin, relay_log option(Non-Critical)

It should not return "unknown variable", I hope that message get to be "You need to use --log-bin to make --log-bin-basename work.", like when I give --binlog-format without --log-bin to mysqld.

o- Please update the docs more in detail(Feature Request)

I can't see relay_log_basename needs relay_log, because I can make my server to be replication slave, even if I don't give relay_log option to mysqld.

I changed Synopsis. Thanks,
[25 Dec 2013 11:37] Sveta Smirnova
Thank you for the feedback.

I agree: documentation can be more clearer.
[16 Jan 2014 15:34] Jon Stephens
Let's fix the software issue, first.