更新查询超出锁定等待超时 [英] Update Query Lock wait timeout exceeded
本文介绍了更新查询超出锁定等待超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用以下查询更新表:
I want to update a table using the following query :
UPDATE `time_sheet_list_log` SET `entry_status` = 'History' WHERE `entry_status` = 'Active' AND `transaction_type` = 'Delete' AND `employee_id` = '77'
但我不断收到以下错误:
But I keep getting the following error :
A Database Error Occurred
Error Number: 1205
Lock wait timeout exceeded; try restarting transaction
UPDATE `time_sheet_list_log` SET `entry_status` = 'History' WHERE `entry_status` = 'Active' AND `transaction_type` = 'Delete' AND `employee_id` = '77'
Filename: C:\Xampp_1\htdocs\timesheet\system\database\DB_driver.php
Line Number: 330
我必须重新启动mysql DB才能接受。请告诉我我做错了什么?
I have to restart mysql DB for it accept. please advise what am I doing wrong?
推荐答案
运行show full processlist;查询以找出可能的操作/查询,这将获得对表的锁定。
(使用KILL进程标识;如果它不是运行的,则删除进程)
Run show full processlist; query to figure out a possible operation/query which would have acquired a lock on the table. ( use KILL process id ; to remove the process if it is something not suppose to be running )
这篇关于更新查询超出锁定等待超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文