I\'ve been getting a Deadlock found when trying to get lock; try restarting transaction error on my InnoDB tables. Here is the query:
Deadlock found when trying to get lock; try restarting transaction
UPDATE views
That's the proper way, as the documentation states:
Normally, you must write your applications so that they are always prepared to re-issue a transaction if it gets rolled back because of a deadlock.
If you want to reduce the occurrence of deadlocks, you must show us the tables DDL and indexes.