Bug #15455 Can't SELECT the system_time_zone system variable (but can SHOW)
Submitted: 3 Dec 2005 9:48 Modified: 20 Dec 2005 9:56
Reporter: Roland Bouman Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.17-BK, 5.0.16 OS:Linux (Linux, winxp prof)
Assigned to: Assigned Account CPU Architecture:Any

[3 Dec 2005 9:48] Roland Bouman
Description:
The system_time_zone variable cannot be retrieved with a select statement. The error:
ERROR 1193 (HY000): Unknown system variable 'system_time_zone'
results

However, the time_zone variable can be selected without any problem.

Both can be retrieved with a SHOW command however. 

It was expected that the system_time_zone variable could  be selected just like the tme zone variable.

How to repeat:
mysql> select @@time_zone;
+-------------+
| @@time_zone |
+-------------+
| SYSTEM      |
+-------------+
1 row in set (0.00 sec)

mysql> select @@system_time_zone;
ERROR 1193 (HY000): Unknown system variable 'system_time_zone'
mysql> show variables like '%time_zone%';
+------------------+-------------------------+
| Variable_name    | Value                   |
+------------------+-------------------------+
| system_time_zone | W. Europe Standard Time |
| time_zone        | SYSTEM                  |
+------------------+-------------------------+
2 rows in set (0.01 sec)

Suggested fix:
Please allow us to select the system_time_zone variable, just like this is possible for the time_zone variable.

If this is not a bug, please document this behaviour in http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html
[3 Dec 2005 17:36] Valeriy Kravchuk
Thank you for a problem report. Verify just as described on 5.0.17-BK (ChangeSet@1.2041, 2005-12-01 15:10:35-08:00) on Linux:

mysql> select @@time_zone;
+-------------+
| @@time_zone |
+-------------+
| SYSTEM      |
+-------------+
1 row in set (0,00 sec)

mysql> select @@system_time_zone;
ERROR 1193 (HY000): Unknown system variable 'system_time_zone'
mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| system_time_zone | EET    |
| time_zone        | SYSTEM |
+------------------+--------+
2 rows in set (0,00 sec)
[20 Dec 2005 9:56] Alexey Botchkov
http://bugs.mysql.com/bug.php?id=12792