I have two machines,
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?