title: mysql multiple unique keys with on duplicate key reference
body: <p>i have a table structure like this </p>
  
  <pre><code>id,f1,f2,f3,f4
  </code></pre>
  
  <p>id is primary key , f1 and f3 are unique keys</p>
  
  <p>my question is when i use <code>ON DUPLICATE KEY UPDATE</code></p>
  
  <p>Which key is it considering for valuation</p>
  
  <p>consider the query</p>
  
  <pre><code>INSERT INTO t1 (f1,f2,f4) VALUES (.....) ON DUPLICATE KEY UPDATE f4=...."
  </code></pre>
  
  <p>As shown above will it consider the key to be f1 ? or f3 or the id</p>
  
  <p>and if i have a query like this</p>
  
  <pre><code>INSERT INTO t1 (f1,f2,f3,f4) VALUES (.....) ON DUPLICATE KEY UPDATE f4=...."
  </code></pre>
  
  <p>what key will it consider then ?</p>
  
  <p>Thanks guys :)</p>