Bug #7571 Server & Client characterset are shown under different decriptions
Submitted: 29 Dec 2004 12:11 Modified: 22 Feb 2005 20:26
Reporter: Ozgur Yavuz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:Ver 14.7 Distrib 4.1.7, for Win95/Win98 OS:Microsoft Windows (Windows 2000/Linux)
Assigned to: Alexander Barkov CPU Architecture:Any

[29 Dec 2004 12:11] Ozgur Yavuz
Description:
Status command , returns Client characterset as Server characterset and
Server characterset as client character set.

As You can see latin1 is the  initial client character set. But it is shown as server caharacter set which is utf8.

D:\>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.1.7-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> status
--------------
mysql  Ver 14.7 Distrib 4.1.7, for Win95/Win98 (i32)

Connection id:          17
Current database:
Current user:           ODBC@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         4.1.7-nt
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    latin1
TCP port:               3306
Uptime:                 51 min 25 sec

Threads: 3  Questions: 28618  Slow queries: 0  Opens: 100  Flush tables: 1  Open tables: 43  Queries per second avg: 9.276
--------------

mysql> set character_set_client=latin2;
Query OK, 0 rows affected (0.00 sec)

mysql> status
--------------
mysql  Ver 14.7 Distrib 4.1.7, for Win95/Win98 (i32)

Connection id:          17
Current database:
Current user:           ODBC@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         4.1.7-nt
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin2
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    latin1
TCP port:               3306
Uptime:                 51 min 36 sec

Threads: 3  Questions: 28621  Slow queries: 0  Opens: 100  Flush tables: 1  Open tables: 43  Queries per second avg: 9.245
--------------

mysql>

How to repeat:
Type "status" on mysql client.
And type "show variables",
When you compare the results, You will see that value shown as "Server characterset" is infact Client characterset.
[29 Dec 2004 22:40] Miguel Solorzano
Thank you for the bug report. Tested on Linux BK source 4.1:

mysql> show variables like "%character%";
+--------------------------+--------------------------------------------+
| Variable_name            | Value                                      |
+--------------------------+--------------------------------------------+
| character_set_client     | latin2                                     |
| character_set_connection | latin1                                     |
| character_set_database   | latin1                                     |
| character_set_results    | latin1                                     |
| character_set_server     | latin1                                     |
| character_set_system     | utf8                                       |
| character_sets_dir       | /home/miguel/dbs/4.1/share/mysql/charsets/ |
+--------------------------+--------------------------------------------+
7 rows in set (0.00 sec)

mysql> status;
--------------
bin/mysql  Ver 14.7 Distrib 4.1.9, for pc-linux (i686)

Connection id:          5
Current database:       test
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         4.1.9-debug-log
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin2
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /tmp/mysql.sock
Uptime:                 13 hours 12 min 10 sec
[21 Feb 2005 12:05] Alexander Barkov
Fixed in 4.1.11.
Now waiting for being merged into 5.0.3.
[22 Feb 2005 20:26] Paul Dubois
Noted in 4.1.11, 5.0.3 changelog.