📜  一般错误:超过 1205 锁定等待超时;尝试重新启动事务 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:05.704000             🧑  作者: Mango

代码示例1
You are using a transaction; autocommit does not disable transactions, it just makes them automatically commit at the end of the statement.

What is happening is, some other thread is holding a record lock on some record (you're updating every record in the table!) for too long, and your thread is being timed out.

You can see more details of the event by issuing a

SHOW ENGINE INNODB STATUS
after the event (in sql editor). Ideally do this on a quiet test-machine.