Bug #41070 SET SESSION binlog_format requires SUPER privilege
Submitted: 27 Nov 2008 13:32 Modified: 2 Dec 2008 9:13
Reporter: jocelyn fournier (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1.30 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: qc

[27 Nov 2008 13:32] jocelyn fournier
Description:
Hi,

I'm trying to use SET SESSION binlog_format in my application, but it seems to require SUPER privilege (according to the doc, only SET GLOBAL binlog_format should require the SUPER privilege).

Regards,
  Jocelyn Fournier

How to repeat:
With a user without SUPER privilege :

SET SESSION binlog_format='ROW';
ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation

(note the root user has set before SET GLOBAL binlog_format='MIXED', don't know if it could have an impact)
[27 Nov 2008 22:45] Sveta Smirnova
Thank you for the report.

Verified as described: according to http://dev.mysql.com/doc/refman/5.1/en/binary-log-setting.html "To change a global variable you need the SUPER privilege.", but actually it requires super for session variable as well.
[28 Nov 2008 16:11] Giuseppe Maxia
This behavior was changed in 5.1.29
http://dev.mysql.com/doc/refman/5.1/en/news-5-1-29.html

The documentation needs to be fixed. Changed the bug category accordingly.
[28 Nov 2008 16:17] jocelyn fournier
Hi,

Why not requiring the REPLICATION SLAVE privilege instead of SUPER privilege ?
Having the possibility to change the binlog format in the application is great, but I really don't want to give SUPER privilege to the app user to be able to do so...

Regards,
  Jocelyn
[1 Dec 2008 18:10] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
[1 Dec 2008 18:13] jocelyn fournier
Hi,

Any comments about the REPLICATION SLAVE privilege controlling SET SESSION binlog_format ?

Regards,
  Jocelyn
[1 Dec 2008 18:19] Paul DuBois
The binary log has use outside of replication context. It's not a replication-only log, so a replication privilege isn't appropriate. (In my opinion.)
[2 Dec 2008 9:13] jocelyn fournier
Ok about the binlog used outside of the replication context, but usually the binlog_format will be changed to have some speed up in the context of replication ?

Thx,
  Jocelyn
[2 Dec 2008 16:31] Paul DuBois
Hi Jocelyn,

This was determined to be a docs issue, and it's been dealt with that way and closed. Regarding a change in privilege to set binlog_format, you could submit a separate feature request. Thanks.