title: Update Inner Join Freeze
body: <p>For some reason, this <code>UPDATE</code> query hang forever. If I replace to <code>SELECT</code> - it get the result instantly.</p>
  
  <pre><code>UPDATE table1 AS t1
  INNER JOIN
  (
      SELECT count(*) as total, left(number,7) as prefix, outcome FROM table1
      where outcome like '%Passed%'
      group by prefix 
      order by total desc limit 200
  ) AS t2 
  ON t2.prefix = left(t1.number,7) AND t1.outcome = 'Fail'
  SET t1.outcome = '', t1.status = 'NEW'
  </code></pre>
  
  <p>What is wrong there?</p>