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.