title: UPDATE with INNER JOIN is not updating
body: <p>I'm trying to transfer the impact value from an old table (esp) to a new table (esm). Both table share similar structures:</p>
  
  <pre><code>esp
  +--------+------+----------------------------
  |codeNorm|impact|Other columns i dont care...
  +--------+------+----------------------------
  
  esm
  +--------------+------+--------------------------------------
  |codeMasterNorm|impact|Other different columns i dont care...
  +--------------+------+--------------------------------------
  </code></pre>
  
  <p>First i created a SELECT query that brings only the records that have different impact between them (impact can be NULL):</p>
  
  <pre><code>SELECT esm.codeMasterNorm, esm.impact, esp.codeNorm, esp.impact FROM esm
  INNER JOIN esp ON esp.codeNorm = esm.codeMasterNorm AND IFNULL(esp.impact, 0) &lt;&gt; IFNULL(esm.impact, 0);
  </code></pre>
  
  <p>This returned:</p>
  
  <blockquote>
    <p>163 rows in set (0.75 sec)</p>
  </blockquote>
  
  <p>Then i created the UPDATE/INNER JOIN query</p>
  
  <pre><code>UPDATE esm
  INNER JOIN esp ON esp.codeNorm = esm.codeMasterNorm AND IFNULL(esp.impact, 0) &lt;&gt; IFNULL(esm.impact, 0)
  SET esm.impact = esp.impact;
  </code></pre>
  
  <p>This returned:</p>
  
  <blockquote>
    <p>Query OK, 163 rows affected (1.35 sec) Rows matched: 163  Changed: 163
    Warnings: 0</p>
  </blockquote>
  
  <p>But when i re-run the SELECT query again, this return the same result:</p>
  
  <blockquote>
    <p>163 rows in set (1.25 sec)</p>
  </blockquote>
  
  <p>Any ideas of why is not updating the records?</p>