Bug #50008 client crashes with "status" command when connection charset info unavailable
Submitted: 31 Dec 2009 8:04 Modified: 4 Feb 2010 10:18
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:5.1, 5.5 OS:Any
Assigned to: CPU Architecture:Any
Tags: regression
Triage: Triaged: D2 (Serious)

[31 Dec 2009 8:04] Shane Bester
Description:
stack trace of client crash:

mysql.exe!mysql_fetch_row
mysql.exe!com_status
mysql.exe!read_and_execute
mysql.exe!main
mysql.exe!__tmainCRTStartup
kernel32.dll!BaseProcessStart

output of testcase is:
mysql> status
--------------
mysql  Ver 14.14 Distrib 5.1.41, for Win64 (unknown)

Connection id:          2
SSL:                    Not in use
Using delimiter:        ;
Server version:         4.0.24-nt
Protocol version:       10
Connection:             localhost via TCP/IP
ERROR 1193 (HY000): Unknown system variable 'character_set_client'
ERROR 1193 (HY000): Unknown system variable 'character_set_client'
<crash>

5.0.88 client didn't crash.

How to repeat:
connect to a 4.0.x server using a 5.1 or 5.5 client and run "status".

the crash can also happen if connecting to 5.x server and it crashes at right moment.

Suggested fix:
more error checking is needed.
[31 Dec 2009 9:34] Sveta Smirnova
With 3.23 server I get:

mysql> status;
ERROR 1064 (HY000): You have an error in your SQL syntax near 'limit 1' at line 1
[4 Jan 2010 9:46] Susanne Ebrecht
Did you put something different in you my.cnf then latin1 or utf8?
[8 Jan 2010 16:42] Shane Bester
You have to connect to a 4.0.x server. now i tried again and 5.1.41 client crashes and 5.1.42 client doesn't crash. 
Sorry, this maybe a duplicate of bug #47655 :-0
[4 Feb 2010 10:18] Sveta Smirnova
Thank you for the feedback.

Verified as described using 4.0 server. This is not duplicate of bug #47655 5.0 client works fine.