Why do I need SELECT rollback in mysql (InnoDB)?

I came across a bad recommendation SELECT *in a large InnoDB table in mysql database.

So, after 10 minutes, I realized the error, found it connectionidwith a list of processes and tried to kill both the connection and the request with the kill command. Then I executed another query in the same table.

show processlistshows the original selection to get the Killed flag, but is stuck in the "Data Transfer" state. The following request is waiting for a lock. This has been going on for several hours.

Now I understand why, if my initial query somehow changed the table, then what I will describe will wait for a rollback.

But it was select; what would it even mean a rollback of choice?

So, I was wondering if anyone could tell me what I'm waiting for, and if there are any convenient ways to just cancel the request select.

+4
source share
1 answer

You do not expect transaction rollback, as others have said. I also ran into this problem: call it a mistake, because it really is, although MySQL does not agree.

Now I can give you nothing but an enlightened guess because you get this "dead end", but I can give you a solution:

UNLOCK TABLES http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html

+1
source

All Articles