Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>How can I display these open transactions and commit or cancel them? </p> </blockquote> <p>There is no open transaction, MySQL will rollback the transaction upon reconnect.<br> You cannot commit the transaction (IFAIK). </p> <p>You display threads using</p> <pre><code>SHOW FULL PROCESSLIST </code></pre> <p>See: <a href="http://dev.mysql.com/doc/refman/5.1/en/thread-information.html">http://dev.mysql.com/doc/refman/5.1/en/thread-information.html</a> </p> <p>It will not help you, because you cannot commit a transaction from a broken connection.</p> <p><strong>What happens when a connection breaks</strong><br> From the MySQL docs: <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-tips.html">http://dev.mysql.com/doc/refman/5.0/en/mysql-tips.html</a></p> <blockquote> <p>4.5.1.6.3. Disabling mysql Auto-Reconnect</p> <p>If the mysql client loses its connection to the server while sending a statement, it immediately and automatically tries to reconnect once to the server and send the statement again. <strong>However</strong>, even if mysql succeeds in reconnecting, your first connection has ended and all your previous session objects and settings <strong>are lost</strong>: temporary tables, the autocommit mode, and user-defined and session variables. Also, <strong>any current transaction rolls back</strong>. </p> <p>This behavior may be dangerous for you, as in the following example where the server was shut down and restarted between the first and second statements without you knowing it: </p> </blockquote> <p>Also see: <a href="http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html">http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html</a> </p> <p><strong>How to diagnose and fix this</strong><br> To check for auto-reconnection:</p> <blockquote> <p>If an automatic reconnection does occur (for example, as a result of calling mysql_ping()), there is no explicit indication of it. To check for reconnection, call <code>mysql_thread_id()</code> to get the original connection identifier before calling <code>mysql_ping()</code>, then call <code>mysql_thread_id()</code> again to see whether the identifier has changed. </p> </blockquote> <p>Make sure you keep your last query (transaction) in the client so that you can resubmit it if need be.<br> And disable auto-reconnect mode, because that is dangerous, implement your own reconnect instead, so that you know when a drop occurs and you can resubmit that query.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload