title: How do I detect if my application isn't committing transactions?
body: <p>I'm using the <a href="https://dev.mysql.com/doc/connector-python/en/" rel="nofollow noreferrer">MySQL Python Connector</a></p>
  <p>At the beginning of all requests, I take a database connection from the connection pool. At the end of all requests, I commit the connection to ensure that no uncommitted transactions are inadvertently lost. However, I would like to find these uncommitted transactions in an automated way, so that they can be properly committed in their more appropriate place.</p>
  <p>Is there a way for <a href="https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-commit.html" rel="nofollow noreferrer">Connection.commit()</a> (or a related function) to somehow report if anything was actually committed? If there was, I can set up some monitoring to track these events and slowly resolve them over time.</p>