Bug #29304 mysql command line client still crash when ctrl-c is pressed
Submitted: 22 Jun 2007 15:39 Modified: 1 Feb 2008 20:49
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.0.44 OS:Microsoft Windows
Assigned to: Assigned Account CPU Architecture:Any
Triage: D1 (Critical)

[22 Jun 2007 15:39] Shane Bester
Description:
interrupting the debug build of mysql command line client with ctrl-c still causes a few crashes. first one was fixed in bug #17926

here are two others:

crash1
----------
mysql.exe!tee_print_sized_data  Line 2486 + 0x3 bytes
mysql.exe!print_table_data  Line 2456 + 0x16 bytes
mysql.exe!com_go  Line 2144 + 0xc bytes
mysql.exe!add_line  Line 1344 + 0xb bytes
mysql.exe!read_and_execute  Line 1151 + 0x16 bytes
mysql.exe!main  Line 498 + 0x12 bytes
mysql.exe!__tmainCRTStartup()  Line 318 + 0x19 bytes
mysql.exe!mainCRTStartup()  Line 187

crash2
---------
mysql.exe!DoTrace  Line 1242 + 0x5 bytes
mysql.exe!_db_enter_  Line 739 + 0x9 bytes
mysql.exe!mysql_fetch_row  Line 2883 + 0x24 bytes
mysql.exe!print_table_data  Line 2412 + 0x9 bytes
mysql.exe!com_go  Line 2144 + 0xc bytes
mysql.exe!add_line  Line 1344 + 0xb bytes
mysql.exe!read_and_execute  Line 1151 + 0x16 bytes
mysql.exe!main  Line 498 + 0x12 bytes
mysql.exe!__tmainCRTStartup()  Line 318 + 0x19 bytes
mysql.exe!mainCRTStartup()  Line 187

How to repeat:
mysql -uroot -p test --quick
drop table if exists t1;
create table t1(id int);
insert into t1 values (1),(2),(3),(4),(5);
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
<repeat until over a million records>

select * from t1;
<after a few seconds, hit ctrl-c a few times>

Suggested fix:
somebody should review the code and signal handler that triggers mysql to begin an exit.
[22 Jun 2007 16:12] Shane Bester
full stack traces

Attachment: bug29304_windows_stacks.txt (text/plain), 1.95 KiB.

[14 Jan 2008 8:49] Timothy Smith
See also: Bug #26243, Bug #26892
[1 Feb 2008 20:49] Iggy Galarza
Duplicate of bug#26243

Note - Both crashes happen in the same signal handler.  Crash 1 happens when a long running query is running.  Crash 2 happens when the client is idle.  The fix for 26243 should address both.