MySQL Forums
Forum List  »  InnoDB

Re: Lock Wait TimeOut Different row Update/Delete
Posted by: Sulthan Hakiem
Date: March 31, 2022 09:27AM

Additional Information
from show engine innodb status result, sql witch cause lock wait timeout

1. UPDATE acc_ledger_monthly SET
alm_last_balance = ROUND(alm_beg_balance + alm_kredit - alm_debet, 2)
WHERE alm_period = p_period AND alm_branch = p_branch AND alm_acc = v_parent


2. UPDATE acc_ledger_monthly SET
alm_debet = ROUND(alm_debet - v_debet, 2),
alm_kredit = ROUND(alm_kredit - v_credit, 2)
WHERE alm_period = v_period AND alm_branch = v_branch AND alm_acc = v_acc AND alm_curr = v_curr

Why that query causing lock wait timeout? both query have alm_period and alm_branch fields different value

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Lock Wait TimeOut Different row Update/Delete
41
March 31, 2022 09:27AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.