Bug #11775 Variable character_set_system does not exist (sometimes).
Submitted: 6 Jul 2005 13:22 Modified: 14 Sep 2005 0:46
Reporter: Per-Erik Martin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:Any (Any)
Assigned to: Sergei Glukhov CPU Architecture:Any

[6 Jul 2005 13:22] Per-Erik Martin
Description:
The system variable character_set_system shows up in 'show variables' (as it should), but is not currently settable (deliberately), but it's also not selectable. In both cases it gives a misleading error message, claiming that the variable is unknown.

How to repeat:
mysql> show variables like 'character%';
+--------------------------+--------------------------------------------+
| Variable_name            | Value                                      |
+--------------------------+--------------------------------------------+
| character_set_client     | latin1                                     |
| character_set_connection | latin1                                     |
| character_set_database   | latin1                                     |
| character_set_results    | latin1                                     |
| character_set_server     | latin1                                     |
| character_set_system     | utf8                                       |
| character_sets_dir       | /usr/local/mysql-5.0/share/mysql/charsets/ |
+--------------------------+--------------------------------------------+
7 rows in set (0.01 sec)

mysql> select @@character_set_server;
+------------------------+
| @@character_set_server |
+------------------------+
| latin1                 |
+------------------------+
1 row in set (0.00 sec)

mysql> set character_set_server = latin1;
Query OK, 0 rows affected (0.00 sec)

mysql> select @@character_set_system;
ERROR 1193 (HY000): Unknown system variable 'character_set_system'
mysql> set character_set_system = utf8;
ERROR 1193 (HY000): Unknown system variable 'character_set_system'
mysql> 

Suggested fix:
'select @@character_set_system' should work, and attempting to set it should result in a more accurate error message.
[2 Sep 2005 8:20] 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/29222
[6 Sep 2005 11:34] Alexander Barkov
Ok to push.
[7 Sep 2005 10:37] 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/29416
[7 Sep 2005 10:40] Sergei Glukhov
Fixed in 5.0.13
[14 Sep 2005 0:46] Paul Dubois
Noted in 5.0.13 changelog.