MySQL Forums
Forum List  »  MyISAM

Re: table locking expected behavior
Posted by: KimSeong Loh
Date: January 20, 2006 11:22PM

Write locks takes priority over read locks unless you specify otherwise, thats all. It should not matter whether it is an explicit or implicit locks. That is as far as I understand it.

So, it is important to know if the locks in #2 and #3 are read or write.

Assuming the oder is that #2 read is received before #3 locks when #1 has write locked the table.

When #1 finishes and release the lock,
if #3 is a write lock, the #3 will get the lock first and #2 (read) will have to wait.
if #3 is a read lock, the it queues behid #2 which is also a read lock, both can continue if there is no connection waiting for a write lock on the table, since a read lock can be shared.






Edited 1 time(s). Last edit at 01/20/2006 11:28PM by KimSeong Loh.

Options: ReplyQuote


Subject
Views
Written By
Posted
2961
January 17, 2006 07:56PM
1888
January 17, 2006 10:44PM
1804
January 18, 2006 12:18AM
1832
January 18, 2006 01:53AM
1792
January 18, 2006 03:46PM
1914
January 18, 2006 10:30PM
1888
January 20, 2006 11:18AM
Re: table locking expected behavior
1928
January 20, 2006 11:22PM
1878
January 22, 2006 03:24PM
1897
January 22, 2006 06:46PM


Sorry, you can't reply to this topic. It has been closed.

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.