Bug #70000 unable to interrupt a mysql client 'source' file processing
Submitted: 12 Aug 2013 17:53 Modified: 13 Aug 2013 10:39
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.7.2 OS:Windows
Assigned to: CPU Architecture:Any

[12 Aug 2013 17:53] Shane Bester
Description:
Once a 'source' file is loaded into mysql client, you cannot interrupt 
the processing with either ctrl-c or ctrl-break.  ctrl-c only aborts the
current statement, but it continues onto the next one immediately.

I expect ctrl-break to stop the processing of the source file 
(or quit mysql totally).

How to repeat:
Create a file called /tmp/in.sql:
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);
select sleep(2);

in client, run:

source /tmp/in.sql

Now try to halt the processing without killing every single statement.

Suggested fix:
Proper fix is debatable.  On windows I liked idea of ctrl-break to be a more 'severe' version of ctrl-c, and stop the execution of the statement, or exit the client totally.
[13 Aug 2013 10:39] MySQL Verification Team
Hello Shane,

Thank you for the reasonable feature request and test script.

Regards,
Umesh