Hanging Transactions in MySQL Innodb

Suppose I execute the following SQL statements:

start transaction; insert into someTable (userId, amount) values (33, 44); 

Please note that at the end of this statement there are no commits or rollbacks. I also have no way to require the inclusion of autoCommit.

How can dba detect such an unfinished transaction? I tried using show innodb status, but it provides too much information. I try to find uncommitted transactions and force them to commit or cancel.

Thanks.

+4
source share
1 answer

Autocommit will not help you here, start transaction cancels it.

Broken transactions will be rolled back as soon as the connection time expires or the client reconnects, whichever happens first.
It is not possible to complete a dangling transaction; the only possible option is rollback.

If you want to understand the status output of InnoDB, see:
http://www.mysqlperformanceblog.com/2006/07/17/show-innodb-status-walk-through/

+2
source

All Articles