MySQL Race Conditions
Does this cause a race condition with MySQL (InnoDB):
Try to get record.
If record doesn't exist, return.
If record exists, delete it and add a log entry saying that is was deleted.
End Transaction (commit/rollback).
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?
Are there any precautions that I need to take?