Sample Header Ad - 728x90

Process possessing lock crashes

1 vote
1 answer
179 views
I have two machines, M1 and M2, through which I am connecting to **MySQL** Database on machine M3 using Perl script (DBI.pm). So, here is the scenario that I am confused about: M1 places a table level lock, and performs some operations. M2 also does the same. Table level locking mechanism is guarantying me that both of them will not be locking the table at the same time. But, what if M1 has locked the table, and suddenly after performing half hte updates, the machine crashes or the Perl script process crashes, what happens to the lock then? My updates were performed mid-way, do those get rolled back? And what is the best way to deal with these kind of locks?
Asked by ATP (111 rep)
Jul 19, 2016, 03:50 AM
Last activity: Jun 29, 2025, 05:07 AM