Bug #10125 Collation system variables cannot set from my.cnf
Submitted: 24 Apr 2005 11:01 Modified: 25 Sep 2005 8:42
Reporter: Gabor Handon Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.11 OS:Linux (Debian)
Assigned to: CPU Architecture:Any

[24 Apr 2005 11:01] Gabor Handon
Description:
Using debian packages, i set the following charset and collation variables in my.cnf:
[mysqld]
default-character-set   = latin2                                                                                   
default-collation       = latin2_hungarian_ci                                                                      
character_set_server    = latin2                                                                                   
collation_server        = latin2_hungarian_ci

When i show variables in console, got this
| character_set_client            | latin1                      |
| character_set_connection        | latin1                      |
| character_set_database          | latin2                      |
| character_set_results           | latin1                      |
| character_set_server            | latin2                      |
| character_set_system            | utf8                        |
| character_sets_dir              | /usr/share/mysql/charsets/  |
| collation_connection            | latin1_swedish_ci           |
| collation_database              | latin2_hungarian_ci         |
| collation_server                | latin2_hungarian_ci         |

character_set_client
character_set_connection
character_set_results
collation_connection
are new in mysql 4.1.11, but cannot set from my.cnf!
In this case i got "?" all of hungarian special character.

How to repeat:
try to set the new variables in my.cnf

Suggested fix:
It would be nice to set these variables form my.cnf, becuase its not a good way to modify all of php scripts to first run query "SET variable=value;"

PHP doesnt read [client] section, why couldnt i set default value for charset and collation for connection, result, client
[24 Apr 2005 11:03] Gabor Handon
http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[25 Apr 2005 17:40] Sinisa Milivojevic
Please set it as "Feature request"
[26 Apr 2005 17:21] Sergei Golubchik
character_set_client/character_set_connection/character_set_results describe the *client*.
Server cannot set them, they belong to [client] section of my.cnf.

As for PHP not reading [client] section, there are different workarounds for this, e.g. --init_connect=xxx. Ask on the list for details or use your support contract.
[25 Sep 2005 8:42] Sergei Golubchik
Fixed as bug#9948