Bug #59321 RFE: GRANT ... WITH SQL_MODE=...
Submitted: 5 Jan 2011 23:19 Modified: 6 Jan 2011 6:23
Reporter: Kevin Benton Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S4 (Feature request)
Version:5.5+ OS:Any
Assigned to: CPU Architecture:Any

[5 Jan 2011 23:19] Kevin Benton
Description:
Please consider adding the ability to set the default SQL_MODE on a per-user basis as a part of the permissions given.

Right now, we have individual users asking for us to set ANSI_QUOTES for them but others that require ANSI_QUOTES to be turned off. We'd like the folks requesting ANSI_QUOTES on to set the sql_mode themselves, but they don't seem to be able to do that in their software.

This would also be helpful for me as an administrator if I can set my own SQL_MODE so that I don't have to keep turning off zero dates in the default sql mode when I am creating or altering tables. The database knows how to handle everything else for me under normal circumstances.

How to repeat:
See description.

Suggested fix:
See description.
[5 Jan 2011 23:26] Kevin Benton
This could be done as...

GRANT ... WITH DEFAULT_SQL_MODE = ...

equally effectively given that MySQL doesn't restrict the ability to change the SQL_MODE variable yet.
[6 Jan 2011 6:23] Valeriy Kravchuk
Thank you for the feature request.