title: Mysql batch update locking on innodb
body: <p>If I do a query such as this:</p>
  
  <pre><code>UPDATE atable SET avalue = 0 WHERE id IN (SELECT id FROM anotherTable WHERE id &gt; 0 AND id &lt; 1000)
  </code></pre>
  
  <p>On an innodb table. Do all the rows with id between 0 and 1000 on <code>anotherTable</code> and/or <code>table</code> get locked all at once, or would they all get locked one at a time?</p>