Bug #75060 Set read_only to true automatically if MySQL is aware it is act as a slave
Submitted: 1 Dec 2014 12:47 Modified: 3 Dec 2014 17:27
Reporter: Tim Smith Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.6.20/5.7 OS:Any
Assigned to: CPU Architecture:Any

[1 Dec 2014 12:47] Tim Smith
Description:
MySQL slave should set read_only to true unless it is set to false explicitly in order to prevent unexpected replication failure due to a write operation on the slave.

How to repeat:
1. Create a MySQL slave without set read_only to false explicitly.
2. Issue "show global variables like 'read_only'. The result is OFF.

Suggested fix:
MySQL slave should set read_only to true if there is any MySQL master information is given (i.e. master.info).
[3 Dec 2014 17:27] MySQL Verification Team
I do not think that this would be a welcome feature. Although acting as a slave, server can have some additional tables and / or databases on which it is writing. Actually, there is a significant number of installations that have it as a practice.

It is on the administrator to set it as read_only.