How to Debug and Fix Deadlocks on InnoDB row-level locking during simultaneous checkout writes in Modern Laravel Applications
Understanding InnoDB Row-Level Locking in High-Concurrency Scenarios
Deadlocks during simultaneous checkout operations in a Laravel application, particularly when leveraging InnoDB’s row-level locking, are a common and frustrating symptom of race conditions. These deadlocks occur when two or more transactions are waiting for locks that the other holds, creating a circular dependency that the database cannot resolve. For checkout processes, this often manifests when multiple users attempt to purchase the last few items of a product concurrently. InnoDB’s default behavior is to acquire locks as needed, and without careful transaction management, this can lead to the deadlock scenario.
The core issue lies in the order of operations and the duration for which locks are held. Consider two concurrent checkout transactions:
- Transaction A: Checks inventory for Product X, then attempts to decrement inventory for Product X, then attempts to create an order.
- Transaction B: Checks inventory for Product X, then attempts to decrement inventory for Product X, then attempts to create an order.
If Transaction A acquires a lock on Product X’s inventory record and then Transaction B attempts to acquire a similar lock, one will block. If, in a slightly more complex scenario, Transaction A locks Product X and then tries to lock Product Y, while Transaction B locks Product Y and then tries to lock Product X, a deadlock is inevitable. InnoDB’s deadlock detection mechanism will eventually identify this and roll back one of the transactions, typically returning an error like SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction.
Diagnosing Deadlocks: Tools and Techniques
Effective diagnosis is the first step to resolution. Fortunately, MySQL provides robust tools for identifying and analyzing deadlocks.
Enabling the InnoDB Deadlock Log
The most crucial step is to enable logging for InnoDB deadlocks. This is typically done by setting the innodb_print_all_deadlocks variable in your MySQL configuration file (my.cnf or my.ini). Restart your MySQL server after making this change.
Add or modify the following in your [mysqld] section:
[mysqld] innodb_print_all_deadlocks = 1
Once enabled, MySQL will log detailed information about deadlocks to its error log file. The location of this file varies by operating system and installation, but common paths include /var/log/mysql/error.log or /usr/local/mysql/data/hostname.err.
Analyzing the Deadlock Log Output
The output in the MySQL error log for a deadlock is verbose but highly informative. It typically includes:
- A timestamp indicating when the deadlock occurred.
- The transactions involved, identified by their transaction IDs.
- The SQL statements being executed by each transaction at the time of the deadlock.
- The locks held by each transaction and the locks they were waiting for. This is the most critical part for understanding the circular dependency.
Here’s a simplified example of what you might see:
2023-10-27 10:30:00 0x7f8b1c7f7700 InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for a lock, and it took another lock. InnoDB: Transaction [TRXID] was waiting for