Bug #76303 Falsely reports interrupt when previous command was interrupted
Submitted: 12 Mar 2015 20:11 Modified: 17 Mar 2015 23:57
Reporter: Egmont Koblinger Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.19 OS:Linux (Ubuntu Utopic)
Assigned to: CPU Architecture:Any

[12 Mar 2015 20:11] Egmont Koblinger
Description:
When a long-running command that produces tons of output is interrupted with Ctrl-C, the next command that you try to execute also incorrectly fails with an "interrupted" message rather than performing its task.

How to repeat:
Take a large-ish table (containing several times 10.000 rows). Issue a command where you accidentally forget to type in "count()":

mysql> select * from sometable;

While the output starts flowing, notice that this was not your intent and interrupt with ^C:

<row8123>
<row8124>^C
<row8125>
Ctrl-C -- sending "KILL QUERY 55" to server ...
Ctrl-C -- query aborted.
+-----+----------+--------+ [bottom of the table]
17070 rows in set (0.13 sec)

Now press Up to invoke the previous command, and edit it the way you first intended:

mysql> select count(*) from sometable;
ERROR 1317 (70100): Query execution was interrupted

You get this error message. Launching this command once again properly reports the count.
[17 Mar 2015 23:57] MySQL Verification Team
Not repeatable on CentOS 6.5 but repeatable on Ubuntu Utopic:

Ctrl-C -- sending "KILL QUERY 2" to server ...
Ctrl-C -- query aborted.
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
131072 rows in set (0,45 sec)

mysql> select count(*) from tb;
ERROR 1317 (70100): Query execution was interrupted