Details
-
Type:
Task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
It would be great if we could have this syntax:
SET variable = value FOR account
The variable should be set immediately when specified user connects.
This would allow us to configure an application's settings without affecting the global behavior. This is useful for closed source applications, and for applications we'd prefer not to touch (for example because we want to be able to upgrade the open source application with a trivial apt-get, or because the maintainer of the application is unreliable).
Of course we'd also need a way to configure this in my.cnf, and a syntax to ask the server the default variables for a given user.
I hope this is possible.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Until this is implemented, you can emulate this, I think, with, a stored procedure and --init-connect:
CREATE PROCEDURE autoexec () BEGIN IF USER() = 'foo@bar' THEN SET variable = value; ... END IF ENDand