title: Getting the current transaction ID with MySQL
body: <p>Is it possible with MySQL 5.5 to get the current transaction ID? Something like...</p>
  
  <pre><code>BEGIN;
  SELECT CURRENT_XID(); -- foo
  ...
  SELECT CURRENT_XID(); -- also foo
  ROLLBACK;
  
  SELECT CURRENT_XID(); -- NOT foo
  </code></pre>
  
  <p>The actual value isn't important, as long as I can get some unique identifier that will always return the same value throughout the same transaction.</p>