title: Find out if REPLACE statement has replaced or just inserted in MySQL
body: <p>Is there a way in MySQL to find out if the last REPLACE statement actually replaced any row or just performed a regular insert?
  <code>LAST_INSERT_ID()</code> doesn't seem to help, since the autoincrement counter is updated in all cases.</p>