title: Stop MySQL incrementing ID on duplicate key name (not inserting)
body: <pre><code>START TRANSACTION;
      INSERT INTO `a` (`name`, `age`) 
      VALUES (:age, :danger)
      ON DUPLICATE KEY UPDATE name = VALUES(name), age = VALUES(age);
  
      INSERT INTO `b` (`age`, `danger`) 
      VALUES (:age, :danger)
      ON DUPLICATE KEY UPDATE age = VALUES(age), danger = VALUES(danger);            
  COMMIT;
  </code></pre>
  
  <p>The above SQL transaction is increasing the auto increment value even if there is a duplicate entry. Is there any way to stop it from incrementing the value if it's simply updating the values (not inserting them)?</p>