I have a mysql DELETE query where the WHERE clause uses the primary key with IN:
delete from my_table where id in (4, 900, 700);
I am getting deadlock errors. I don't understand why this is, or how to avoid it. No other queries are selecting for these IDs, although other queries are selecting/deleting/adding from the same table. The PK id is specific for a single user so no one else is using these same IDs. I thought that using the primary key would prevent the delete statement from locking other rows.
Edit: engine is innoDB