Mon, 2014-10-27 10:21hartmut
This plugin logs long running transactions to the server error log when transaction took more than a configurable number of seconds.
https://github.com/hholzgra/transaction_time_audit
Motivation
A customer was looking for a solution to track down long running transactions. After discussing some alternatives we decided that an Audit Plugin was the best approach towards this.
An Audit Plugin has the advantage that it:
- Is executed within the
mysqldserver. Its access to server internals via the official API is limited, but it turned out that the existing API provided all the building blocks we needed for a basic implementation:- the full stream of executed queries is visible
- current transaction ID is visible …