Bug #86860 EXPLAIN of non-SELECT statement fails on SLAVE
Submitted: 29 Jun 2017 5:31 Modified: 29 Jun 2017 5:45
Reporter: monty solomon Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.7.18 OS:Any
Assigned to: CPU Architecture:Any

[29 Jun 2017 5:31] monty solomon
Description:
The manual states that EXPLAIN works with SELECT, DELETE, INSERT, REPLACE, and UPDATE statements but using EXPLAIN with INSERT, UPDATE, or REPLACE fails on the slave with the error

ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement

How to repeat:
Use a user that does not have SUPER privilege and execute any EXPLAIN UPDATE statement.

For example,

mysql> EXPLAIN UPDATE test SET col=123 WHERE col=456\G
ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement

Suggested fix:
Fix EXPLAIN to work on any server in any mode.
[29 Jun 2017 5:45] MySQL Verification Team
Hello monty,

Thank you for the report.
This is duplicate of Bug #74543, please see Bug #74543

Thanks,
Umesh