title: MySQL Race Conditions
body: <p>Does this cause a race condition with MySQL (InnoDB):</p>
  
  <ol>
  <li><p>Start Transaction.</p></li>
  <li><p>Try to get record.</p></li>
  <li><p>If record doesn't exist, return.</p></li>
  <li><p>If record exists, delete it and add a log entry saying that is was deleted.</p></li>
  <li><p>End Transaction (commit/rollback).</p></li>
  </ol>
  
  <p>Is it possible for another process to start just before the delete step in 2b, detect the presence of the record and then have both processes enter item delete entries into the log?</p>
  
  <p>Are there any precautions that I need to take?  </p>
  
  <p>Thanks.</p>