我正在运行以下 MySQL UPDATE 语句:
I'm running the following MySQL UPDATE statement:
mysql> update customer set account_import_id = 1;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
我没有使用事务,为什么会出现此错误?我什至尝试重新启动我的 MySQL 服务器,但没有帮助.
I'm not using a transaction, so why would I be getting this error? I even tried restarting my MySQL server and it didn't help.
该表有 406,733 行.
The table has 406,733 rows.
您正在使用事务;autocommit 不会禁用事务,它只是让它们在语句结束时自动提交.
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
在事件之后(在 SQL 编辑器中).理想情况下,在安静的测试机器上执行此操作.
after the event (in SQL editor). Ideally do this on a quiet test-machine.
这篇关于获取“超出锁定等待超时;尝试重新启动事务"即使我没有使用交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 for 循环数组
pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合适的
如何将 Apache Spark 与 MySQL 集成以将数据库表作为How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何将 Apache Spark 与 MySQL 集成以将数据库表作为