jezB
jezB

Reputation: 11

MySQL error code 1205: Lock wait timeout exceeded when trying to delete multiple rows with the same id

I am getting a "Lock wait timeout exceeded error..." message (code 1205) when trying to delete multiple rows with the same id from my table. If I use SELECT instead of DELETE, the query works fine and returns the rows that I want to remove. This is my query

delete FROM `mydb`.`data` 
WHERE list_id= any
(select t2.list_id from `base`.`cards` as t2
where t2.type=3 and t2.time = "") ;

I cannot use a primary key/indexing because I have multiple rows for the same list_id. I have spent hours trying to find the solution on the internet without any joy. Can someone please help!? Thanks

Upvotes: 1

Views: 839

Answers (0)

Related Questions