Bug #56520 Show all user-defined variables.
Submitted: 2 Sep 2010 20:33 Modified: 3 Sep 2010 3:56
Reporter: John Boero Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Options Severity:S4 (Feature request)
Version:5.1 OS:Any (show user variables)
Assigned to: CPU Architecture:Any
Tags: show all user variables

[2 Sep 2010 20:33] John Boero
Why is there no option to show the user-defined variables?  When several @variables are defined, is there no way to list them later on?

I suggest the spec be updated to include:
OLD: show [global|session] variables [like, where, etc]
NEW: show [global|session|user] variables [like, where, etc]


How to repeat:
In a session, define any number of user variables using @[var_name].  Then go grab a beer and watch TV for a few minutes.  Come back to your session and scratch your head because you can't remember what user variables you defined and there's no way to recall them...

This would be valuable in apps that query through a persistent connection.

Suggested fix:
Please add the option USER to show [GLOBAL|SESSION] variables syntax.  Maybe the TSQL standard prohibits this, or maybe there's another way to do this.  I sure can't find one.  An explanation would be nice.  Thanks.
[2 Sep 2010 20:34] John Boero
Whoops - I finally found a bug describing this same problem.  Bug #20307

[2 Sep 2010 20:34] John Boero
This is a feature request - and is duplicate of http://bugs.mysql.com/bug.php?id=20307.
[3 Sep 2010 3:56] Valeriy Kravchuk
Duplicate of Bug #20307.