Bug #58114 NULL value in a system variable is not displayed as such in SHOW VARIABLES/I_S

Submitted: 10 Nov 2010 13:55 Modified: 15 Dec 2010 15:37
Reporter: Georgi Kodinov Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[10 Nov 2010 13:55] Georgi Kodinov
Description:
The external_user and the proxy_user variables when not set to non-empty have different values depending on how you retrieve the values.

How to repeat:

mysql> show variables like '%user';
+---------------+-------+
| Variable_name          | Value      |
+---------------+-------+
| external_user            |                 |
| proxy_user                |                  |
| report_user               |                  |
+---------------+-------+
3 rows in set (0.01 sec)

mysql> select @@external_user, @@proxy_user;
+-----------------+--------------+
| @@external_user | @@proxy_user |
+-----------------+--------------+
| NULL            | NULL         |
+-----------------+--------------+
1 row in set (0.00 sec)

Suggested fix:
Make show variables and SELECT @@ return the same value (preferably NULL)
[10 Nov 2010 13:57] Georgi Kodinov
Verified on 5.5-bugteam : 
+select @@version;
+@@version
+5.5.8-rc-debug-log
+show variables like '%user';
+Variable_name  Value
+external_user
+proxy_user
+report_user
+select @@external_user, @@proxy_user;
+@@external_user        @@proxy_user
+NULL   NULL

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.