Bug #58009 Client exits after second ^C
Submitted: 5 Nov 2010 10:23 Modified: 10 Nov 2010 22:34
Reporter: River Tarnell Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.50, 5.1.53 OS:Solaris
Assigned to: CPU Architecture:Any

[5 Nov 2010 10:23] River Tarnell
Description:
On Linux, ^C can be used several times to abort a running query:

river@sql-s1:enwiki_p> select count(*) from pagelinks;
^CCtrl-C -- sending "KILL QUERY 17568953" to server ...
Ctrl-C -- query aborted.
ERROR 1317 (70100): Query execution was interrupted
river@sql-s1:enwiki_p> select count(*) from pagelinks;
^CCtrl-C -- sending "KILL QUERY 17568953" to server ...
Ctrl-C -- query aborted.
ERROR 1317 (70100): Query execution was interrupted
river@sql-s1:enwiki_p>

On Solaris, the second ^C will make the client exist instead of aborting the query:

river@sql-s1:enwiki_p> select count(*) from pagelinks;
^CCtrl-C -- sending "KILL QUERY 17568990" to server ...
Ctrl-C -- query aborted.
ERROR 1317 (70100): Query execution was interrupted
river@sql-s1:enwiki_p> select count(*) from pagelinks;
^C                                                                                                                           willow%

How to repeat:
Run a query on the MySQL client on Solaris.  Abort it with ^C.  Repeat.
[10 Nov 2010 22:34] Sveta Smirnova
Thank you for the report.

Verified as described:

$./bin/mysql -uroot -S /tmp/mysql_ssmirnova.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.53 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select sleep(10);
^CCtrl-C -- sending "KILL QUERY 1" to server ...
Ctrl-C -- query aborted.
+-----------+
| sleep(10) |
+-----------+
+-----------+
1 row in set (0.53 sec)

mysql> select sleep(10);
^C