Check active transactions

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
miguelenguica
Posts: 18
Joined: Mon 11 Apr 2011 15:28

Check active transactions

Post by miguelenguica » Thu 25 Jul 2013 09:26

Hi.

Is there a way to check the number of active transactions (on the database, not on the local UniConnection component) at any given time, using MySQL + UniConnection?


Thanks.

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Check active transactions

Post by DemetrionQ » Fri 26 Jul 2013 09:30

Hello.

TUniConnection allows to retrieve the information about the state of the current connection only. As for questions concerning retrieving information about all transactions for all connections to the server, please forward them to MySQL support.

If you need to check if the table is locked, you can do this using the 'SHOW OPEN TABLES' SQL command ( http://dev.mysql.com/doc/refman/5.1/en/ ... ables.html ), for example:

Code: Select all

SHOW OPEN TABLES WHERE in_use <> 0 AND `Table` = 'YourTable' AND `Database` = 'YourDatabase';

Post Reply