Bug #46271 mysqld --verbose --help creates binary log .index file
Submitted: 17 Jul 2009 17:44 Modified: 20 Jul 2009 5:39
Reporter: Paul DuBois Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[17 Jul 2009 17:44] Paul DuBois
Description:
mysqld --verbose --help creates a binary log .index file in the current directory if binlogging is enabled.

As far as I can tell, this does not happen when mysqld is invoked from an account that has access to the data directory. If mysqld is invoked from another account that does not have access to the data directory, The binary log .index  file is created.

How to repeat:
Create /tmp/my.cnf with these contents:

[mysqld]
log-bin=binlog

From an account that does not have access to the data directory, invoke this command:

mysqld --defaults-file=/tmp/my.cnf --verbose --help

Aside from the --help message, the output I see is as follows (I am using 5.1.38 installed in /var/mysql/50138):

090717 12:40:01 [Warning] Can't create test file /private/var/mysql/50138/data/dhcp-101.lower-test
090717 12:40:01 [Warning] Can't create test file /private/var/mysql/50138/data/dhcp-101.lower-test
/var/mysql/50138/libexec/mysqld: Can't change dir to '/private/var/mysql/50138/data/' (Errcode: 13)
090717 12:40:01 [Note] Plugin 'FEDERATED' is disabled.
/var/mysql/50138/libexec/mysqld: Table 'mysql.plugin' doesn't exist
090717 12:40:01 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090717 12:40:01 [Warning] Forcing shutdown of 1 plugins

And an empty binlog.index file is created in the current directory.
[20 Jul 2009 5:39] Sveta Smirnova
Thank you for the report.

This is duplicate of bug #31106