Bug #29468 MySQL client crashes if Ctrl+C is followed by exit
Submitted: 1 Jul 2007 13:35 Modified: 9 Jul 2007 15:12
Reporter: Philip Stoev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.0.44-enterprise-gpl-nt OS:Microsoft Windows (2000)
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: qc

[1 Jul 2007 13:35] Philip Stoev
Description:
The mysql client will crash if Ctrl+C is hit, followed by issuing "exit". There are a few other bugs in the tracker relating to Ctrl+C crashes, however this one appears to be different from the ones already filed.

How to repeat:
C:\Documents and Settings\Administrator>mysql -uproc
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.0.44-enterprise-gpl-nt MySQL Enterprise Server (GPL)

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

--- We hit Ctrl + C
mysql> Aborted

--- We type exit
mysql> exit
Bye

--- Mysql crashes

Suggested fix:
A very wild guess would be that maybe this is something related to saving the history file upon exit?
[2 Jul 2007 8:45] Valeriy Kravchuk
Thank you for a bug report. Verified just as described on XP. You should type "exit" fast, or you'll get:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot test -P3308
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.44-enterprise-gpl-nt MySQL Enterprise Server (GPL)

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

mysql> mysql> Aborted
exiError in my_thread_global_end(): 1 threads didn't exit

C:\Program Files\MySQL\MySQL Server 5.0\bin>

instead of a crash.
[9 Jul 2007 15:12] Georgi Kodinov
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

This is a duplicate of bug #29469.