I have a single, unreplicated MySQL server.
We're experiencing a problem where an INSERT INTO ... SELECT statement is causing a write lock on the origin table.
The origin table is in one database. The destination table is a temporary table in another database.
Following the advice of this question's accepted answer: How to improve INSERT INTO ... SELECT locking behavior
I changed the following three configuration variables in my.cnf and restarted the server:
innodb_autoinc_lock_mode=2
binlog_format=row
transaction-isolation=READ-COMMITTED
This seemed to make the problem worse, though correlation may not be causation in this case.
How do I prevent this write lock?