Bug #9613 Some read-only variables are selectable, others are not
Submitted: 4 Apr 2005 14:18 Modified: 1 Sep 2005 2:12
Reporter: Victoria Reznichenko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Any (any)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[4 Apr 2005 14:18] Victoria Reznichenko
Description:
Some read-only variables are selectable with SELECT @@variable_name, others are not.
For example:

mysql> show variables like "version%";
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| version                 | 4.1.11-debug-log    |
| version_comment         | Source distribution |
| version_compile_machine | i686                |
| version_compile_os      | pc-linux            |
+-------------------------+---------------------+
4 rows in set (0.00 sec)

mysql> select @@version;
+------------------+
| @@VERSION        |
+------------------+
| 4.1.11-debug-log |
+------------------+
1 row in set (0.00 sec)

mysql> select @@version_comment;
ERROR 1193 (HY000): Unknown system variable 'version_comment'
mysql> select @@version_compile_machine;
ERROR 1193 (HY000): Unknown system variable 'version_compile_machine'
mysql> select @@version_compile_os;
+----------------------+
| @@version_compile_os |
+----------------------+
| pc-linux             |
+----------------------+
1 row in set (0.00 sec)

How to repeat:
select @@version;
select @@version_comment;
select @@version_compile_machine;
select @@version_compile_os;
[30 Apr 2005 15:55] Sergei Golubchik
Fixing it properly for all variables would require significant changes that we cannot do in the stable version (4.1).

For now we'll only "fix" it for have_innodb variable, others will be fixed when we'll redo the complete framework (probably in 5.1)
[26 Aug 2005 8:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/28879
[30 Aug 2005 13:14] Ramil Kalimullin
Fixed in 4.1.15.
The behaviour changed only for have_innodb variable.
[1 Sep 2005 2:12] Paul DuBois
Noted in 4.1.15 changelog.