How to simulate a deadlock on a row in MySQL?
Question:
To simulate a lock in mysql I can grab the row with the following:
BEGIN;
SELECT * FROM table WHERE id=1 FOR UPDATE;
Now, if I try and update that row (from another connection) it will raise the following error after innodb_lock_wait_timeo...
databasedev.hashnode.dev2 min read