[MDEV-33319] max_binlog_total_size and slave_connections_needed_for_purge require wrong permissions Created: 2024-01-26  Updated: 2024-01-27

Status: Open
Project: MariaDB Server
Component/s: Replication, Variables
Affects Version/s: N/A
Fix Version/s: 11.4

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-31404 Implement binlog_space_limit In Testing

 Description   

Since 10.5, variables for binlog configuration require BINLOG ADMIN privilege, not SUPER. I think the same should apply to the new max_binlog_total_size and slave_connections_needed_for_purge variables, too.

bb-11.4-timestamp 53df87b27d9e0c0e7e5f2e2e7e5aabd86aa20bee

MariaDB [(none)]> show grants for current_user();
+------------------------------------------------------+
| Grants for binlogger@localhost                       |
+------------------------------------------------------+
| GRANT BINLOG ADMIN ON *.* TO `binlogger`@`localhost` |
+------------------------------------------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]> set global max_binlog_size= 1024*1024;
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [(none)]> set global max_binlog_total_size= 1024*1024;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation
MariaDB [(none)]> set global slave_connections_needed_for_purge= 0;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

MariaDB [(none)]> show grants for current_user();
+----------------------------------------------+
| Grants for superman@localhost                |
+----------------------------------------------+
| GRANT SUPER ON *.* TO `superman`@`localhost` |
+----------------------------------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]> set global max_binlog_size= 1024*1024;
ERROR 1227 (42000): Access denied; you need (at least one of) the BINLOG ADMIN privilege(s) for this operation
MariaDB [(none)]> set global max_binlog_total_size= 1024*1024;
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [(none)]> set global slave_connections_needed_for_purge= 0;
Query OK, 0 rows affected (0.000 sec)



 Comments   
Comment by Michael Widenius [ 2024-01-27 ]

Strange that max_relay_log_size requires SUPER ?
Maybe I should fix that at the same time?

Comment by Michael Widenius [ 2024-01-27 ]

max_binlog_total_size and slave_connections_needed_for_purge fixed in my tree to require BINLOG ADMIN privilege

Comment by Elena Stepanova [ 2024-01-27 ]

I don't know to whom max_relay_log_size should belong, but I doubt it would be BINLOG ADMIN. Maybe REPLICATION SLAVE ADMIN? I guess serg can say for sure (and whether it needs to be changed).

Comment by Sergei Golubchik [ 2024-01-27 ]

I'd say it's logical if max_relay_log_size would require the same privileges as relay_log_purge. In that case — REPLICATION SLAVE ADMIN, indeed.

Generated at Thu Feb 08 10:38:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.