Bug #58651 relay log is created on master or standalone server
Submitted: 2 Dec 2010 9:16 Modified: 16 Jul 2011 13:33
Reporter: Paolini Julia Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0.77 OS:Linux (RHEL 5.5)
Assigned to: CPU Architecture:Any
Tags: relay log

[2 Dec 2010 9:16] Paolini Julia
Description:
Hi,

Files specifically created by replication are created on some standalone servers or master servers.
On theses servers, no specifications about replication in the my.cnf are written.

Here are the four files created and their content:
   - relay-log.info:
./mysqld-relay-bin.000001
4
mysql-bin.000087
169

   - master.info:
14
mysql-bin.000087
169

test

3306
60
0

   - mysqld-relay-bin.XXXXXX:
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#101129  6:00:02 server id 1  end_log_pos 98    Start: binlog v 4, server v 5.0.77-log created 101129  6:00:02
# at 98
#101129  8:00:02 server id 1  end_log_pos 148   Rotate to mysqld-relay-bin.000501  pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

   - mysqld-relay-bin.index:

As I flush logs every 2 hours, a new empty relay log is created.

To stop this, I stopped the MySQL server, and delete thoses files and then start MySQL again.
If I don't stop the MySQL server while deleting, the files are re created.

How to repeat:
Actually, I didn't found a way to reproduce it.
Some serveurs has it and some not.
[2 Dec 2010 9:18] Paolini Julia
The mysqld-relay-bin.index file contains the entire list of all mysqld-relay-bin.XXXXXX created.
[2 Dec 2010 12:45] Susanne Ebrecht
please show output from:
SHOW SLAVE STATUS\G
[3 Jan 2011 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[3 Jan 2011 10:05] Paolini Julia
Seems that it happens when I import a dump where the command 'CHANGE MASTER TO' is present (due to the option master-data of mysqldump).
Don't think it was happening before.
[3 Jan 2011 10:11] Paolini Julia
In response to Suzanne (sorry, I didn't reply to your message earlier):

mysql> show slave status\G;
Empty set (0.00 sec)

ERROR:
No query specified
[9 Feb 2011 14:33] Valeriy Kravchuk
If CHANGE MASTER TO is executed (thus trying to make server a slave), why do you think there is any bug here?
[11 Feb 2011 10:26] Paolini Julia
Previously, if the server was not set up as a slave (no informations about being a slave in the my.cnf, nor files like master.info in /var/lib/mysql), CHANGE MASTER did not make the server act like a slave.

It was convenient for some scenarii, like I could have a master/slave configuration and need to import on the master a dump made on the master because of a problem with the data.
[16 Jul 2011 13:33] Valeriy Kravchuk
Our manual, http://dev.mysql.com/doc/refman/5.0/en/change-master-to.html, clearly says:

"CHANGE MASTER TO changes the parameters that the slave server uses for connecting to the master server, for reading the master binary log, and reading the slave relay log. It also updates the contents of the master.info and relay-log.info files."

So, no matter what happened (or seemed to happen in the past), this is not a bug.