Bug #57247 SET binlog_format requires SUPER privilege, even if unchanged

Submitted: 5 Oct 2010 12:55 Modified: 5 Oct 2010 19:33
Reporter: Alex Hermann Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[5 Oct 2010 12:55] Alex Hermann
Description:
Since 5.1.29 the docs state that the SUPER privilege is needed to _CHANGE_ the binlog_format variable, but if an unprivilegd user sets the var to the current value, the statement is still denied even though no _CHANGE_ is about to take place

> SET @@binlog_format="STATEMENT"
Access denied; you need the SUPER privilege for this operation

How to repeat:
mysql> select @@version;
+----------------------+
| @@version            |
+----------------------+
| 5.1.45-1~bpo50+1-log |
+----------------------+

mysql> select @@binlog_format;
+-----------------+
| @@binlog_format |
+-----------------+
| STATEMENT       |
+-----------------+

mysql> SET @@binlog_format="STATEMENT";
ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation

Suggested fix:
If the var is about to be set to the current value, don't fail the statement.
[5 Oct 2010 19:33] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please read in the user manual how MySQL Access Privilege works.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.072 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.