Statement rollback vs transaction rollback in MySQL
<p>From <a href="http://dev.mysql.com/doc/refman/5.7/en/innodb-error-codes.html" rel="nofollow">MySQL docs</a> I get the following (on error codes):</p>

<ul>
<li><blockquote>
  <p>1205 (ER_LOCK_WAIT_TIMEOUT)</p>
  
  <p>Lock wait timeout expired. The statement that waited too long was
  rolled back (not the entire transaction). You can increase the value
  of the innodb_lock_wait_timeout configuration option if SQL statements
  should wait longer for other transactions to complete, or decrease it
  if too many long-running transactions are causing locking problems and
  reducing concurrency on a busy system.</p>
</blockquote></li>
</ul>

<p>In this statement, it clearly makes difference between statement roll back and transaction roll back. My question is how can a statement be rolled back, and transaction inside which runs does not roll back? Even more, I get such a lock timeout in a transaction, and the full transaction is rolled back. Can someone enlighten me on this?</p>