Description:
Execute a SET NAMES directly after connecting to the server using the current charset.
Otherwise there will be a messup when using e.g. umlauts in table names.
How to repeat:
Launch MySQL Monitor.
execute
show variables like 'character_set%';
+--------------------------+-------------------------------------+
| Variable_name | Value |
+--------------------------+-------------------------------------+
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_set_database | latin1 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character-sets-dir | c:\programme\mysql5\share\charsets/ |
| character_set_results | latin1 |
+--------------------------+-------------------------------------+
which is not good.
Suggested fix:
Use the current charset and execute:
set names cp1250;
Then the values will be correct.
mysql> show variables like 'character_set%';
+--------------------------+-------------------------------------+
| Variable_name | Value |
+--------------------------+-------------------------------------+
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_set_database | latin1 |
| character_set_client | cp1250 |
| character_set_connection | cp1250 |
| character-sets-dir | c:\programme\mysql5\share\charsets/ |
| character_set_results | cp1250 |
+--------------------------+-------------------------------------+