当前位置:网站首页>Lock wait timeout exceeded try restarting transaction
Lock wait timeout exceeded try restarting transaction
2022-07-06 12:35:00 【wx5caecf2ed0645】
There have been frequent occurrences in recent projects Lock wait timeout exceeded; try restarting transaction This mistake , It makes us miserable , To solve the problem , Find a lot of information on the Internet , Finally, the problem reappears . The specific operation steps are as follows ( I use mysql The tool is navicat):
First step : Turn on sql Command page
The second step : Input start transaction; Start a transaction
The third step : Input update sentence UPDATE TABLENAME set time=null where id=29163;( Remember not to Submit (commit;))
Step four : Writing tests
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
Run the program and run the following 3 individual sql View results
1 2 3 | |
Get the following run results . We found several others trx_state Status is LOCK WAIT, Get the result we want to reproduce
Step five : Wait for the error to appear , After waiting for a period of time, we will find that the program reports an error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
The results obtained from the above , You can know that this error occurs when a transaction is not committed , Other transactions also operate on the same object , So we found the cause of the problem , We can modify it according to this situation .
This is the mistake I encountered this time , Let me share with you , To avoid such a situation in the program .
边栏推荐
- Arduino JSON data information parsing
- There is no red exclamation mark after SVN update
- JS Title: input array, exchange the largest with the first element, exchange the smallest with the last element, and output array.
- Single chip Bluetooth wireless burning
- (课设第一套)1-4 消息传递接口 (100 分)(模拟:线程)
- idea中导包方法
- [offer78] merge multiple ordered linked lists
- Types de variables JS et transformations de type communes
- ORA-02030: can only select from fixed tables/views
- Unity3D制作注册登录界面,并实现场景跳转
猜你喜欢
Esp8266 uses Arduino to connect Alibaba cloud Internet of things
编译原理:源程序的预处理及词法分析程序的设计与实现(含代码)
[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree
(3) Introduction to bioinformatics of R language - function, data Frame, simple DNA reading and analysis
Common properties of location
记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
單片機藍牙無線燒錄
JS變量類型以及常用類型轉換
Pytorch: tensor operation (I) contiguous
Basic operations of databases and tables ----- modifying data tables
随机推荐
Office提示您的许可证不是正版弹框解决
Rough analysis of map file
Who says that PT online schema change does not lock the table, or deadlock
(四)R语言的数据可视化——矩阵图、柱状图、饼图、散点图与线性回归、带状图
Single chip Bluetooth wireless burning
Theoretical derivation of support vector machine
Learning notes of JS variable scope and function
. elf . map . list . Hex file
Classification, understanding and application of common methods of JS array
[Clickhouse kernel principle graphic explanation] about the collaborative work of partitioning, indexing, marking and compressed data
Latex learning
CUDA C programming authoritative guide Grossman Chapter 4 global memory
Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]
[offer78]合并多个有序链表
RuntimeError: cuDNN error: CUDNN_ STATUS_ NOT_ INITIALIZED
[Leetcode15]三数之和
Easy to use shortcut keys in idea
What is the maximum length of MySQL varchar field
单片机蓝牙无线烧录
Unity3D制作注册登录界面,并实现场景跳转