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: Smith Tim 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] Smith Tim
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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.