Bug #114588 Setting the instance to super-read-only still allows the flush priveleges comman
Submitted: 9 Apr 2024 1:34 Modified: 9 Apr 2024 10:49
Reporter: xiang wang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[9 Apr 2024 1:34] xiang wang
Description:
The instance can still execute the flush priveleges command to generate a new gtid when set to super-read_only. If executed the slave , it will result in inconsistent master slave gtids.

How to repeat:
mysql> show master status\G
*************************** 1. row ***************************
             File: mysql-bin.000003
         Position: 1071019
     Binlog_Do_DB:
 Binlog_Ignore_DB:
Executed_Gtid_Set: a4a7b541-ebfe-11ee-ae6f-02000aba3f10:1-1339,
b4212406-ebe8-11ee-af6e-02000aba3f10:1-495
1 row in set (0.00 sec)

#The current gitd is a4a7b541-ebfe-11ee-ae6f-02000aba3f10:1-1339,
b4212406-ebe8-11ee-af6e-02000aba3f10:1-495

mysql> set global super_read_only=on;
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> show master status\G
*************************** 1. row ***************************
             File: mysql-bin.000003
         Position: 1071171
     Binlog_Do_DB:
 Binlog_Ignore_DB:
Executed_Gtid_Set: a4a7b541-ebfe-11ee-ae6f-02000aba3f10:1-1340,
b4212406-ebe8-11ee-af6e-02000aba3f10:1-495
1 row in set (0.00 sec)
#Generate a new gtid of a4a7b541-ebfe-11ee-ae6f-02000aba3f10:1340
[9 Apr 2024 10:49] MySQL Verification Team
Hi,

Thank you for the report.