On Sun, Mar 03, 2002 at 07:51:36PM -0800, Son Nguyen wrote:
>     Dear all,
>   If my site has two users try to update the same piece of data in
> mySQL at the same time. 
> 
>   * I wonder if I have to create a lock to handle the race condition in
> my script or not?
> 
>   * Or mySQL already provided a method, which is when the first user
> update the data in mySQL, mySQL is locked until the update query to be
> finished. Then mySQL take the second user's request?

MyISAM tables perform implicit table locking for all queries.  Write
queries use an exlusive write lock, while read queries use a shared
read lock.

Does that help?

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.47-max: up 24 days, processed 812,006,625 queries (382/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to