List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:December 22 2006 5:32pm
Subject:Re: Befuddled Why This Locks
View as plain text  
In the last episode (Dec 22), Jason J. W. Williams said:
> I guess I'm curious why this query acquires a read lock. Is it
> because its in a transaction?  Thank you very much in advance!

You mean as opposed to a write lock?  Only inserts and updates need
write locks.

Or do you mean why is it locking at all?  All selects need to lock the
data they're reading to prevent inserts or updates from changing the
records out from under the select while its running.  MyISAM does it by
locking the entire table.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Befuddled Why This LocksJason J. W. Williams22 Dec
  • Re: Befuddled Why This LocksDan Nelson22 Dec
    • Re: Befuddled Why This LocksJason J. W. Williams22 Dec
      • Re: Befuddled Why This LocksDan Nelson22 Dec