Bug #42035 | session defaults on the account level | ||
---|---|---|---|
Submitted: | 11 Jan 2009 22:15 | Modified: | 1 Oct 2009 7:39 |
Reporter: | Roland Bouman | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: General | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[11 Jan 2009 22:15]
Roland Bouman
[12 Jan 2009 7:57]
Valeriy Kravchuk
Thank you for a reasonable feature request.
[1 Oct 2009 7:35]
MySQL Verification Team
This is a hackish way of doing it: mysqld --init-connect="set session sql_mode=case current_user() when 'shane@%' then 'strict_all_tables' when 'roland@%' then 'strict_trans_tables' when 'bob@%' then '' else 'traditional' end;"
[1 Oct 2009 7:39]
Roland Bouman
Hi Shane, thanks! I have been thinking along these lines, but stopped pursuing it because it would become pretty unmaintainable. I envisioned a solution that would use a stored procedure so you can specify it all in database tables and manage it from there, but unfortunately you cannot persistently set the SQL_MODE from within a stored routine. Really, it would be so much nicer if this could be dealt with in a clean way. Anyway thanks for the suggestion. I'll link to it from the relevant blog post.
[4 Jan 2023 11:46]
Simon Mudd
Related: https://bugs.mysql.com/bug.php?id=105006