super-read-only not allow FLUSH LOGS on 5.7
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Fix Released
|
Medium
|
Laurynas Biveinis |
Bug Description
Description:
Tested in Percona Server 5.7.16 and MySQL Community 5.7.17.
Flush logs command shows the following error when is executed in a slave instance with super-read-only by root user:
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement
This also affects mysqladmin flush-logs command.
How to repeat:
Variables for Master:
gtid-mode = ON
enforce-
Variables for Slave:
gtid-mode = ON
enforce-
log_slave_updates = ON
super_read_only = ON
Requirements:
A) Master/slave configuration using GTIDs.
Procedure:
1) In Master instance create a table and insert a row on it.
mysql> create table test (col integer) ;
Query OK, 0 rows affected (0.03 sec)
mysql> insert into test values (1);
Query OK, 1 row affected (0.01 sec)
2) In Slave instance log as root user and flush logs.
mysql> flush logs ;
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement
Regardless of the error message, the logs are flushed by the command:
mysql> show master status ;
+------
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------
| mysql-bin.000079 | 690 | | | 3bc8c55f-
+------
1 row in set (0.00 sec)
mysql> flush logs ;
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement
mysql> show master status ;
+------
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------
| mysql-bin.000080 | 274 | | | 3bc8c55f-
+------
1 row in set (0.00 sec)
Suggested fix: Avoid error message if all logs are flushed.
Does it work on PS 5.6? (in which case it would be a regression due to implementation switch to upstream)