title: Automatic rollback if program exits
body: <p>The <a href="http://dev.mysql.com/doc/refman/5.5/en/commit.html" rel="nofollow">MySQL documentation on transactions</a> seems to be lacking one important piece of informaton, and that is my question:</p>
  
  <p>If a transaction is in progress and the client disconnects (in my case, if PHP <code>exit</code>s or <code>die()</code>s or simply reaches the end of the code), is the transaction rolled back, or committed?</p>
  
  <p>I'm assuming rolled back, but that could be a massive problem if the assumption is wrong...</p>
  
  <p>If it makes any difference, all the tables are using the InnoDB engine.</p>