MySQL Forums
Forum List  »  Performance

Re: how to find out all sql and table of running transaction
Posted by: Øystein Grøvlen
Date: December 17, 2015 03:08AM

Hi,

AFAIU, that a transaction is shown as running in information_schema.innodb_trx table does not mean that there is an ongoing query. A transaction will be running as long as it is not waiting for a lock until it is comitting/rolling back.

In MySQL 5.6 and 5.7, you can do

SELECT sql_text FROM performance_schema.events_statements_current;

In earlier versions there is SHOW PROCESSLIST, but AFAICT, it will only show you the first 90 characters or so.

Regards,

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: how to find out all sql and table of running transaction
768
December 17, 2015 03:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.