Currently the read_only option is defined the following way:
Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the 'READ ONLY ADMIN' privilege.
The current implementation of read_only does not block users from using
SELECT ... LOCK IN SHARE MODE or LOCK TABLES ... READ, both of which can block
replication threads from continuing. LOCK IN SHARE MODE is especially dangerous as it takes write locks, which will block replication threads.
The solve this issue, we plan to extend the --read_only option to have 3 levels:
Note that the read_only option has no effects on slave/replica threads or temporary tables.
0 changes allowed
1 Make all non-temporary tables read-only, with the exception for users with the 'READ ONLY ADMIN' privilege.
2 block also LOCK TABLES and SELECT IN SHARE MOD
3 block also users with 'READ ONLY ADMIN' privilege. This is sames as MySQL's super_read_only option.