title: "SELECT ... FOR UPDATE" not working for Hibernate and MySQL
body: <p>We have a system in which we must use pessimistic locking in one entity. We are using hibernate, so we use LockMode.UPGRADE. However, it does not lock.</p>
  
  <ul>
  <li>The tables are InnoDB</li>
  <li>We have checked that locking works correctly in the database (5.0.32), so this bug <a href="http://bugs.mysql.com/bug.php?id=18184" rel="nofollow noreferrer">http://bugs.mysql.com/bug.php?id=18184</a> seems to be no problem.</li>
  <li>We have checked that datasource includes the <code>autoCommit = false</code> parameter.</li>
  <li>We have checked that the SQL hibernate (version 3.2) generates includes the " FOR UPDATE".</li>
  </ul>
  
  <p>Thanks,</p>