Skip to content

Error when cancelling queries with Ctrl+C #686

Description

@SunflowerFuchs

Whenever i cancel queries with Ctrl+C, i get the error 'Encountered error while cancelling query: (1094, 'Unknown thread id: 511')'.
I've checked it, and 511 is definitely the id of the thread where the query is running. And after issuing the Ctrl+C, it's definitely killed, despite the error message.

I've set the log_level to debug (attached) and looked through it a bit, and the first thing that comes to mind right now is that maybe the query gets already killed when switching from the connection that's about to be killed to a new one.

Edit: maybe that was right, i've looked at my mysql/error.log, and there are two connection abortions happening; one when cancelling the query, and one when exiting from mycli:

2018-11-16T11:51:09.877271Z 530 [Note] Aborted connection 530 to db: 'dbname' user: 'root' host: 'localhost' (Got an error writing communication packets)
2018-11-16T11:51:11.080717Z 532 [Note] Aborted connection 532 to db: 'dbname' user: 'root' host: 'localhost' (Got an error reading communication packets)

mycli.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions