According to the good word ,
InnoDB uses automatic row-level locking. You can get deadlocks even in the case of transactions that simply insert or delete a single row. This is because these operations are not "atomic"; they automatically set locks on (possibly several) index records of a row inserted or deleted.
How is it possible for two processes to get stuck on the same record?
source share