title: Subquery fails in mysql
body: <p>I have a subquery as follows : which will select the id's  according to   the condition first and delete </p>
  
  <p>the records ,</p>
  
  <pre><code>    Delete from post_master_user_map WHERE id IN
  (SELECT id FROM `post_master_user_map` WHERE posted_by_user_id=110);
  </code></pre>
  
  <p>But it gives me the following error : </p>
  
  <pre><code>You can't specify target table 'post_master_user_map' for update in FROM clause
  </code></pre>
  
  <p>What is wrong with this ? thanks in advance .</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This also fails , I dont why </p>
  
  <pre><code>DELETE FROM `post_master_user_map` WHERE `reshare_id` in (SELECT id FROM `post_master_user_map` WHERE 
  posted_by_user_id=110);
  </code></pre>